mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 02:38:52 -05: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:
parent
6857995498
commit
0b76e3a6f1
|
@ -340,6 +340,8 @@ information on what to include when reporting a bug.
|
||||||
- [Wayland] Bugfix: Window maximization events were not emitted
|
- [Wayland] Bugfix: Window maximization events were not emitted
|
||||||
- [Wayland] Bugfix: `glfwRestoreWindow` assumed it was always in windowed mode
|
- [Wayland] Bugfix: `glfwRestoreWindow` assumed it was always in windowed mode
|
||||||
- [Wayland] Bugfix: `glfwSetWindowSize` would resize a full screen window
|
- [Wayland] Bugfix: `glfwSetWindowSize` would resize a full screen window
|
||||||
|
- [Wayland] Bugfix: A window content scale event would be emitted every time
|
||||||
|
the window resized
|
||||||
- [POSIX] Removed use of deprecated function `gettimeofday`
|
- [POSIX] Removed use of deprecated function `gettimeofday`
|
||||||
- [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
|
- [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
|
||||||
- [WGL] Disabled the DWM swap interval hack for Windows 8 and later (#1072)
|
- [WGL] Disabled the DWM swap interval hack for Windows 8 and later (#1072)
|
||||||
|
|
|
@ -315,7 +315,6 @@ static void resizeWindow(_GLFWwindow* window)
|
||||||
if (!window->wl.transparent)
|
if (!window->wl.transparent)
|
||||||
setOpaqueRegion(window);
|
setOpaqueRegion(window);
|
||||||
_glfwInputFramebufferSize(window, scaledWidth, scaledHeight);
|
_glfwInputFramebufferSize(window, scaledWidth, scaledHeight);
|
||||||
_glfwInputWindowContentScale(window, scale, scale);
|
|
||||||
|
|
||||||
if (!window->wl.decorations.top.surface)
|
if (!window->wl.decorations.top.surface)
|
||||||
return;
|
return;
|
||||||
|
@ -362,6 +361,7 @@ static void checkScaleChange(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
window->wl.scale = maxScale;
|
window->wl.scale = maxScale;
|
||||||
wl_surface_set_buffer_scale(window->wl.surface, maxScale);
|
wl_surface_set_buffer_scale(window->wl.surface, maxScale);
|
||||||
|
_glfwInputWindowContentScale(window, maxScale, maxScale);
|
||||||
resizeWindow(window);
|
resizeWindow(window);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user