constraints: Delay initial maximization until after reparenting is done

For SSD windows the decoration window from the frames client might have
a different maximization state than the client window and would end up
restoring it once shown. Avoid this issue by waiting until all
reparenting is done before applying the initial maximization (and
minimization).

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2579
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3035>
This commit is contained in:
Sebastian Keller 2023-05-31 14:14:04 +02:00 committed by Marge Bot
parent 626498348b
commit 7faf4a308e

View File

@ -600,7 +600,7 @@ place_window_if_needed(MetaWindow *window,
info->fixed_directions = FIXED_DIRECTION_NONE;
}
if (window->placed || did_placement)
if (window->reparents_pending == 0 && (window->placed || did_placement))
{
if (window->maximize_horizontally_after_placement ||
window->maximize_vertically_after_placement)