GNOME Bugzilla – Bug 781945
SIGSEGV dragging window on Wayland when toplevel window set_transient_for is set to another toplevel
Last modified: 2017-06-02 14:26:04 UTC
Seems to be triggered when the following is true: * Toplevel window has set_transient_for(another toplevel window) * Window GdkTypeHint is set to "utility" * Dragging the incorrectly configured window Simple pygobject testcase to trigger this: https://gist.github.com/virtuald/87e64c0610ae0204a2969efc48e7ebb4 Platform is Fedora 25, GTK+ 3.22.12
Truncated backtrace:
+ Trace 237410
In this case here, the window is an xdg_popup which explains why it doesn't have a proxy for move()/resize() because it's not a toplevel. This is coming from commit 28f011e / bug 759738
Humm, actually, it's older than that, this is coming from commit a4448b7 it seems. Basically, a "utility" window is translated as a popup if it's not a "temp" window (which is the case here)
Right, still digging, this is actually from commit 1b58cd1 / bug 756780
Created attachment 350853 [details] [review] [PATCH] wayland: Do not map toplevel utility as popup Applications can specify the type hint as utility even on toplevel windows. When that toplevel is also marked as a transient for another window, GDK Wayland backend would translate that as an xdg_popup which is not appropriate. While utility temp windows should remain mapped as subsurfaces (such as the ones used by treeviews), regular windows should not translate as neither a subsurface nor an xdg_popup.
Anyone to do a review of attachment 350853 [details] [review]? Jonas maybe?
Review of attachment 350853 [details] [review]: Yea, I guess that makes sense, assuming we can rely on the window type to always be used properly. Might be good to fix the miss-use error handling in move/resize code (it checks for xdg_surface, but it should rather check for xdg_toplevel)
Comment on attachment 350853 [details] [review] [PATCH] wayland: Do not map toplevel utility as popup attachment 350853 [details] [review] pushed to git master as commit a84fc38 - wayland: Do not map toplevel utility as popup attachment 350853 [details] [review] pushed to branch gtk-3-22 as commit 63e0515 - wayland: Do not map toplevel utility as popup
Created attachment 353083 [details] [review] [PATCH] wayland: fix xdg_surface test in move/resize drag (In reply to Jonas Ådahl from comment #7) > [...] Might be good to fix the miss-use error handling in move/resize code > (it checks for xdg_surface, but it should rather check for xdg_toplevel) begin_resize_drag() and begin_move_drag() check for xdg_surface being not null, but those apply on xdg_toplevel so they should check for xdg_toplevel being non-null instead.
Review of attachment 353083 [details] [review]: lgtm. I wonder why we didn't warn when this happened before; anyway, not to stop this improvement from landing.
Comment on attachment 353083 [details] [review] [PATCH] wayland: fix xdg_surface test in move/resize drag attachment 353083 [details] [review] pushed to git master as commit 24f9d29 - wayland: fix xdg_surface test in move/resize drag attachment 353083 [details] [review] pushed to branch gtk-3-22 as commit 2d41d77 - wayland: fix xdg_surface test in move/resize drag