GNOME Bugzilla – Bug 791062
Fix mapping window with complete xdg-foreign state
Last modified: 2017-12-08 03:22:04 UTC
Two patches will be attached to this bug: Patch #1 makes it possible to set the parent_of state before showing the window (but after realizing). Patch #2 was added because GNOME Shell has a bug where modal dialogs are never properly teared down, meaning the window content will stay on screen even after the client exits, and the parent window will stay dimmed. See bug 791061 for details.
Created attachment 364721 [details] [review] wayland: Maybe postpone xdg-foreign state setup until mapping In order to map a window with the correct initial parent-child relationship when a modal dialog is set up to be a child of an imported foreign window, the relationship must be set up before the window is mapped. In order to do this, if a window is not yet mapped, postpone the relationship setup until when the window is eventually mapped.
Created attachment 364722 [details] [review] wayland: Destroy the xdg_imported after the wl_surface This way the window manager can handle destruction while having the transient-for relationship still valid.
Review of attachment 364721 [details] [review]: looks ok
Review of attachment 364722 [details] [review]: ok
Attachment 364721 [details] pushed as 7c743e6 - wayland: Maybe postpone xdg-foreign state setup until mapping Attachment 364722 [details] pushed as 6412d25 - wayland: Destroy the xdg_imported after the wl_surface