window: Move required condition into main if statement in show()

No logical changes.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3879>
This commit is contained in:
Jonas Ådahl 2024-07-11 14:33:01 +02:00 committed by Sebastian Wick
parent 9ebbf83e95
commit d7daf50d62

View File

@ -2283,16 +2283,14 @@ meta_window_show (MetaWindow *window)
if (focus_window && if (focus_window &&
window->showing_for_first_time && window->showing_for_first_time &&
!meta_window_is_ancestor_of_transient (focus_window, window) &&
((!place_on_top_on_map && !takes_focus_on_map) || ((!place_on_top_on_map && !takes_focus_on_map) ||
window_would_be_covered_by_always_above_window (window))) window_would_be_covered_by_always_above_window (window)))
{
if (!meta_window_is_ancestor_of_transient (focus_window, window))
{ {
needs_stacking_adjustment = TRUE; needs_stacking_adjustment = TRUE;
if (!window->placed) if (!window->placed)
place_flags |= META_PLACE_FLAG_DENIED_FOCUS_AND_NOT_TRANSIENT; place_flags |= META_PLACE_FLAG_DENIED_FOCUS_AND_NOT_TRANSIENT;
} }
}
if (!window->placed) if (!window->placed)
{ {