GNOME Bugzilla – Bug 782283
Wayland: Crash when dismissing a menu when a tooltip is visible
Last modified: 2017-06-02 13:50:06 UTC
1) In the widget factory, right-click on the GtkLinkButton labeled "link button"). This opens a GtkMenu. 2) Now, with the menu open, hover the menu button again. A tooltip shows up. 3) Press escape 4) The widget-factory now crashes This bug is present both in the current 3.22 release and master. Backtrace:
+ Trace 237429
Created attachment 351976 [details] [review] [PATCH] wayland: check parent surface for subsurface When an event is received while a tooltip is showing, the GtkTooltip's event handling code can end up calling gdk_window_set_transient_for() from gtk_tooltip_set_last_window(). The Wayland GDK backend will try to automatically create a subsurface in gdk_wayland_window_set_transient_for() but if the parent surface is gone meanwhile, this will will cause a crash when trying to create a subsurface from a parent with a null surface. Checking for the parent is not sufficient, we ought to check for the parent surface as well to avoid the crash.
Anyone to do a review of attachment 351976 [details] [review] please? Jonas maybe?
Review of attachment 351976 [details] [review]: Makes sense.
Comment on attachment 351976 [details] [review] [PATCH] wayland: check parent surface for subsurface attachment 351976 [details] [review] pushed to git master as commit 08aade4 - wayland: check parent surface for subsurface attachment 351976 [details] [review] pushed to branch gtk-3-22 as commit c94f40b - wayland: check parent surface for subsurface