Wayland: Ensure that glfw window content scale and kitty window content scale are in sync after the window is placed on a monitor

This commit is contained in:
Kovid Goyal 2019-11-16 10:47:05 +05:30
parent 737d8b96b6
commit d8dd22048a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 8 additions and 0 deletions

View File

@ -43,6 +43,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- Fix a regression in 0.14.5 that caused rendering of private use glyphs - Fix a regression in 0.14.5 that caused rendering of private use glyphs
with and without spaces to be identical (:iss:`2117`) with and without spaces to be identical (:iss:`2117`)
- Wayland: Fix incorrect scale used when first creating an OS window
(:iss:`2133`)
0.14.6 [2019-09-25] 0.14.6 [2019-09-25]
--------------------- ---------------------

1
glfw/wl_platform.h vendored
View File

@ -156,6 +156,7 @@ typedef struct _GLFWwindowWayland
// We need to track the monitors the window spans on to calculate the // We need to track the monitors the window spans on to calculate the
// optimal scaling factor. // optimal scaling factor.
int scale; int scale;
bool initial_scale_notified;
_GLFWmonitor** monitors; _GLFWmonitor** monitors;
int monitorsCount; int monitorsCount;
int monitorsSize; int monitorsSize;

4
glfw/wl_window.c vendored
View File

@ -75,6 +75,10 @@ static bool checkScaleChange(_GLFWwindow* window)
wl_surface_set_buffer_scale(window->wl.surface, scale); wl_surface_set_buffer_scale(window->wl.surface, scale);
return true; return true;
} }
if (window->wl.monitorsCount > 0 && !window->wl.initial_scale_notified) {
window->wl.initial_scale_notified = true;
return true;
}
return false; return false;
} }