summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ã…dahl <jadahl@gmail.com>2023-02-10 16:12:58 +0100
committerMarge Bot <marge-bot@gnome.org>2023-02-13 15:34:24 +0000
commitf5176101cdc6482c713b44509189f18836f43853 (patch)
tree480f0b3dd84d92d65046d05016d7a4e4334bd9c0
parentd870b085807f8fd43121b060a576d7ee1295bd33 (diff)
downloadmutter-f5176101cdc6482c713b44509189f18836f43853.tar.gz
window: Recalculate attachedness for Wayland window parent changes
When modal dialogs are attached, and we set the parent/transient-for after setting the modal type, the attachedness isn't updated. This is (apparently) not the case for X11 windows, as they go through a unmanage/manage dance avoiding the issue. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2810>
-rw-r--r--src/core/window.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/window.c b/src/core/window.c
index 1b88f580e..2ec62c22c 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -7364,6 +7364,13 @@ meta_window_set_transient_for (MetaWindow *window,
g_set_object (&window->transient_for, parent);
+ if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND &&
+ window->attached != meta_window_should_attach_to_parent (window))
+ {
+ window->attached = meta_window_should_attach_to_parent (window);
+ meta_window_recalc_features (window);
+ }
+
/* update stacking constraints */
if (!window->override_redirect)
meta_stack_update_transient (window->display->stack, window);