mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 00:49:48 +00:00
Wayland: Fix reporting of monitor scale changes
Content scale events would be emitted when a window surface entered or
left an output, but not when one of a window's current outputs had its
scale changed.
(cherry picked from commit e37ba80b13)
This commit is contained in:
@@ -111,6 +111,18 @@ static void outputHandleScale(void* userData,
|
||||
struct _GLFWmonitor* monitor = userData;
|
||||
|
||||
monitor->wl.scale = factor;
|
||||
|
||||
for (_GLFWwindow* window = _glfw.windowListHead; window; window = window->next)
|
||||
{
|
||||
for (int i = 0; i < window->wl.monitorsCount; i++)
|
||||
{
|
||||
if (window->wl.monitors[i] == monitor)
|
||||
{
|
||||
_glfwUpdateContentScaleWayland(window);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WL_OUTPUT_NAME_SINCE_VERSION
|
||||
|
||||
Reference in New Issue
Block a user