diff options
author | Aleksandr Mezin <mezin.alexander@gmail.com> | 2021-03-05 14:38:57 +0600 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2021-03-12 16:25:10 +0000 |
commit | 236e9ec68fc56fad5af35e6f663a40ada1b6d0af (patch) | |
tree | af53d6362f7154ec36720565157fbe793dd4835f /src/wayland/meta-window-wayland.h | |
parent | 56fc09151d5da6ec2439c8844ec15499856f373e (diff) | |
download | mutter-236e9ec68fc56fad5af35e6f663a40ada1b6d0af.tar.gz |
wayland/window: Correct detection whether to send `configure`
When deciding if `configure` event should be sent,
`meta_window_wayland_move_resize_internal` compares requested window size
with `window->rect` size. However, `window->rect` is only updated when `commit`
is received. So the following sequence produces incorrect result:
1. a window initially has size `size1`
2. `move_resize_internal` is called with `size2`. `configure` is sent
3. `move_resize_internal` is called with `size1` to restore original size,
but `commit` for `size2` haven't arrived yet. So `window->rect` still has size
`size1`, and thus new `configure` is not sent
4. `commit` for `size2` arrives, window changes size to `size2`
Expected window size in the end: `size1`
Actual: `size2`
To fix the issue, take size from pending `configure` events into account.
Fixes https://gitlab.gnome.org/GNOME/mutter/-/issues/1627
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1755>
Diffstat (limited to 'src/wayland/meta-window-wayland.h')
-rw-r--r-- | src/wayland/meta-window-wayland.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wayland/meta-window-wayland.h b/src/wayland/meta-window-wayland.h index db152daaa..c242757df 100644 --- a/src/wayland/meta-window-wayland.h +++ b/src/wayland/meta-window-wayland.h @@ -77,4 +77,8 @@ void meta_window_wayland_get_max_size (MetaWindow *window, int *width, int *height); +void meta_window_wayland_get_pending_size (MetaWindowWayland *wl_window, + int *width, + int *height); + #endif |