After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 791062 - Fix mapping window with complete xdg-foreign state
Fix mapping window with complete xdg-foreign state
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-12-01 08:36 UTC by Jonas Ådahl
Modified: 2017-12-08 03:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: Maybe postpone xdg-foreign state setup until mapping (2.88 KB, patch)
2017-12-01 08:36 UTC, Jonas Ådahl
committed Details | Review
wayland: Destroy the xdg_imported after the wl_surface (1.33 KB, patch)
2017-12-01 08:37 UTC, Jonas Ådahl
committed Details | Review

Description Jonas Ådahl 2017-12-01 08:36:50 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.
Comment 1 Jonas Ådahl 2017-12-01 08:36:56 UTC
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.
Comment 2 Jonas Ådahl 2017-12-01 08:37:03 UTC
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.
Comment 3 Matthias Clasen 2017-12-07 23:01:22 UTC
Review of attachment 364721 [details] [review]:

looks ok
Comment 4 Matthias Clasen 2017-12-07 23:01:53 UTC
Review of attachment 364722 [details] [review]:

ok
Comment 5 Matthias Clasen 2017-12-08 03:21:56 UTC
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