mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-23 16:58:09 +02:00
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:
1
glfw/wl_platform.h
vendored
1
glfw/wl_platform.h
vendored
@@ -156,6 +156,7 @@ typedef struct _GLFWwindowWayland
|
||||
// We need to track the monitors the window spans on to calculate the
|
||||
// optimal scaling factor.
|
||||
int scale;
|
||||
bool initial_scale_notified;
|
||||
_GLFWmonitor** monitors;
|
||||
int monitorsCount;
|
||||
int monitorsSize;
|
||||
|
||||
4
glfw/wl_window.c
vendored
4
glfw/wl_window.c
vendored
@@ -75,6 +75,10 @@ static bool checkScaleChange(_GLFWwindow* window)
|
||||
wl_surface_set_buffer_scale(window->wl.surface, scale);
|
||||
return true;
|
||||
}
|
||||
if (window->wl.monitorsCount > 0 && !window->wl.initial_scale_notified) {
|
||||
window->wl.initial_scale_notified = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user