place: Fix centering transients over parent

Transient dialogs are meant to be placed centered over their
parent. However as we don't use the DIALOG window type on
wayland, this currently only works for modal dialogs.

To fix this, also apply the policy to NORMAL windows for
wayland clients.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3533>
This commit is contained in:
Florian Müllner 2024-01-17 18:13:22 +01:00 committed by Marge Bot
parent 8e58aa46ac
commit 1ab4faaf18

View File

@ -837,7 +837,9 @@ meta_window_place (MetaWindow *window,
}
if (window->type == META_WINDOW_DIALOG ||
window->type == META_WINDOW_MODAL_DIALOG)
window->type == META_WINDOW_MODAL_DIALOG ||
(window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND &&
window->type == META_WINDOW_NORMAL))
{
MetaWindow *parent = meta_window_get_transient_for (window);