window: Simplify transient_for assignment

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2810>
This commit is contained in:
Jonas Ådahl 2023-02-10 16:12:39 +01:00 committed by Marge Bot
parent 1b75a62030
commit d870b08580

View File

@ -7362,9 +7362,7 @@ meta_window_set_transient_for (MetaWindow *window,
return;
}
/* We know this won't create a reference cycle because we check for loops */
g_clear_object (&window->transient_for);
window->transient_for = parent ? g_object_ref (parent) : NULL;
g_set_object (&window->transient_for, parent);
/* update stacking constraints */
if (!window->override_redirect)