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.

(cherry picked from commit 0b76e3a6f1)
This commit is contained in:
Camilla Löwy
2022-06-10 14:19:13 +02:00
parent 589385aada
commit 608007673f
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -356,7 +356,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;
@@ -403,6 +402,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);
}
}