diff --git a/src/core/window.c b/src/core/window.c index b21b6bb26..25cc5b86f 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -7417,14 +7417,14 @@ meta_window_set_transient_for (MetaWindow *window, } } - /* update stacking constraints */ - if (!window->override_redirect) - meta_stack_update_transient (window->screen->stack, window); - /* 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; + /* update stacking constraints */ + if (!window->override_redirect) + meta_stack_update_transient (window->screen->stack, window); + /* possibly change its group. We treat being a window's transient as * equivalent to making it your group leader, to work around shortcomings * in programs such as xmms-- see #328211.