summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2022-01-07 16:30:19 +0100
committerJonas Ådahl <jadahl@gmail.com>2022-01-07 17:25:14 +0000
commit659463ed426d5f9979f3e9e85c2512a1f9d0203c (patch)
treecd20f4ac790d3e8c50c412d0cf237a3dc063c677
parent53d9aad75bf2490198abc7c82ce531a3fef6c938 (diff)
downloadmutter-659463ed426d5f9979f3e9e85c2512a1f9d0203c.tar.gz
window: Initialize saved_rect_fullscreen too
We save the window rect before going fullscreen to a dedicated variable, so we can go back to the correct dimension. We also have a dedicated variable for returning from other window states, e.g. maximized, and this one we initialized when creating the MetaWindow. This meant that we could always rely on this being up to date on X11 windows that were mapped maximized or fullscreen. What the commit that introduced the saved rect dedicated for going unfullscreen missed was to initialize the new saved rectangle too when creating the MetaWindow. This resulted in windows mapped as fullscreen often ending up misbehaving when unfullscreening, as mutter would tell them to unfullscreen to 0x0. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1786 Fixes: a51ad8f932cb55bdd8a62fc5d8d10af7fc62b0a0 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2210> (cherry picked from commit 13f35ab0640631566f52c80583b09fe4e3dc3685)
-rw-r--r--src/core/window.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/window.c b/src/core/window.c
index c0437eea7..7d86adece 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -1043,6 +1043,7 @@ _meta_window_shared_new (MetaDisplay *display,
/* And this is our unmaximized size */
window->saved_rect = window->rect;
+ window->saved_rect_fullscreen = window->rect;
window->unconstrained_rect = window->rect;
window->depth = attrs->depth;