mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Wayland: Fix erratic fallback decoration behavior
The handler for xdg_toplevel::configure treated the provided size as the content area size when instead it is the size of the bounding rectangle of the wl_surface and all its subsurfaces. This caused the fallback decorations to try positioning themselves outside themselves, causing feedback loops during interactive resizing. Fixes #1991 Fixes #2115 Closes #2127 Related to #1914
This commit is contained in:
parent
24cdc5afda
commit
0f5b095042
@ -24,6 +24,7 @@ video tutorials.
|
|||||||
- Waris Boonyasiriwat
|
- Waris Boonyasiriwat
|
||||||
- Kyle Brenneman
|
- Kyle Brenneman
|
||||||
- Rok Breulj
|
- Rok Breulj
|
||||||
|
- TheBrokenRail
|
||||||
- Kai Burjack
|
- Kai Burjack
|
||||||
- Martin Capitanio
|
- Martin Capitanio
|
||||||
- Nicolas Caramelli
|
- Nicolas Caramelli
|
||||||
@ -145,6 +146,7 @@ video tutorials.
|
|||||||
- Pierre Moulon
|
- Pierre Moulon
|
||||||
- Martins Mozeiko
|
- Martins Mozeiko
|
||||||
- Pascal Muetschard
|
- Pascal Muetschard
|
||||||
|
- James Murphy
|
||||||
- Julian Møller
|
- Julian Møller
|
||||||
- ndogxj
|
- ndogxj
|
||||||
- n3rdopolis
|
- n3rdopolis
|
||||||
|
@ -343,6 +343,8 @@ information on what to include when reporting a bug.
|
|||||||
- [Wayland] Bugfix: A window content scale event would be emitted every time
|
- [Wayland] Bugfix: A window content scale event would be emitted every time
|
||||||
the window resized
|
the window resized
|
||||||
- [Wayland] Bugfix: If `glfwInit` failed it would close stdin
|
- [Wayland] Bugfix: If `glfwInit` failed it would close stdin
|
||||||
|
- [Wayland] Bugfix: Manual resizing with fallback decorations behaved erratically
|
||||||
|
(#1991,#2115,#2127)
|
||||||
- [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)
|
||||||
|
@ -494,10 +494,19 @@ static void xdgToplevelHandleConfigure(void* userData,
|
|||||||
window->wl.fullscreen = fullscreen;
|
window->wl.fullscreen = fullscreen;
|
||||||
|
|
||||||
if (width && height)
|
if (width && height)
|
||||||
|
{
|
||||||
|
if (window->wl.decorations.top.surface)
|
||||||
|
{
|
||||||
|
window->wl.pending.width = _glfw_max(0, width - GLFW_BORDER_SIZE * 2);
|
||||||
|
window->wl.pending.height =
|
||||||
|
_glfw_max(0, height - GLFW_BORDER_SIZE - GLFW_CAPTION_HEIGHT);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
window->wl.pending.width = width;
|
window->wl.pending.width = width;
|
||||||
window->wl.pending.height = height;
|
window->wl.pending.height = height;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
window->wl.pending.width = window->wl.width;
|
window->wl.pending.width = window->wl.width;
|
||||||
|
Loading…
Reference in New Issue
Block a user