Commit b443bd42 authored by Olivier Fourdan's avatar Olivier Fourdan

window: unmanage dialog when clearing transient_for

On Wayland, xdg-foreign would leave a modal dialog managed even after
the imported surface is destroyed.

This is sub-optimal and this breaks the atomic relationship one would
expect between the parent and its modal dialog.

Make sure we unmanage the dialog if transient_for is unset even for
Wayland native windows.

Related: #174
Related: #221
parent 267503b5
......@@ -7987,7 +7987,15 @@ meta_window_set_transient_for (MetaWindow *window,
}
}
}
else if (window->attached && parent == NULL)
{
guint32 timestamp;
timestamp =
meta_display_get_current_time_roundtrip (window->display);
meta_window_unmanage (window, timestamp);
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment