mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 15:23:17 +01:00
Wayland: Fix duplicate window content scale events
The window content scale event was emitted every time the window content area was resized, even if its scale had not changed.
This commit is contained in:
@@ -315,7 +315,6 @@ static void resizeWindow(_GLFWwindow* window)
|
||||
if (!window->wl.transparent)
|
||||
setOpaqueRegion(window);
|
||||
_glfwInputFramebufferSize(window, scaledWidth, scaledHeight);
|
||||
_glfwInputWindowContentScale(window, scale, scale);
|
||||
|
||||
if (!window->wl.decorations.top.surface)
|
||||
return;
|
||||
@@ -362,6 +361,7 @@ static void checkScaleChange(_GLFWwindow* window)
|
||||
{
|
||||
window->wl.scale = maxScale;
|
||||
wl_surface_set_buffer_scale(window->wl.surface, maxScale);
|
||||
_glfwInputWindowContentScale(window, maxScale, maxScale);
|
||||
resizeWindow(window);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user