From 3b5f4671634b9cc461d8ba26edd03286bab88eba Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 10 Apr 2024 16:55:24 +0200 Subject: [PATCH] core: Allow fullscreen modals to move out of the center of their parents If a modal dialog (i.e. with a "revolves around center of parent window" policy) becomes fullscreen, we cannot neatly honor both the modal dialog going fullscreen and the window staying around the center of its parent. In order to make fullscreening work in this situation, allow fullscreen modal dialogs to "snap out" of the parent. This rule will become again effective after the window is unfullscreened. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3425 Part-of: --- src/core/constraints.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/constraints.c b/src/core/constraints.c index 9af0f0004..4bd2bc471 100644 --- a/src/core/constraints.c +++ b/src/core/constraints.c @@ -1154,6 +1154,9 @@ constrain_modal_dialog (MetaWindow *window, meta_window_get_placement_rule (window)) return TRUE; + if (window->fullscreen) + return TRUE; + /* We want to center the dialog on the parent, including the decorations for both of them. info->current is in client X window coordinates, so we need to convert them to frame coordinates, apply the centering and then