GNOME Bugzilla – Bug 775319
[Wayland]: gdk_window_get_toplevel() fails to return the toplevel of a child subsurface
Last modified: 2016-11-30 09:09:33 UTC
Description: Creating a gdk window subsurface with another gdk window as parent generates critical warnings: GLib-GObject-WARNING **: invalid (NULL) pointer instance GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed GLib-GObject-WARNING **: invalid (NULL) pointer instance GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed Those are coming from _gdk_wayland_display_create_window_impl() because gdk_window_get_frame_clock() returns NULL. gdk_window_get_frame_clock() tries to get the frame clock from the toplevel, by walking the window tree back to the corresponding top level. Unfortunately, it does so by checking the window_type to be GDK_WINDOW_CHILD whereas it can also be a GDL_WINDOW_SUBSURFACE now (bug 774475). Since it cannot find the correct toplevel window, it returns NULL as the clock frame, which then causes the critical warnings in _gdk_wayland_display_create_window_impl() Trivial patch to follow.
Created attachment 340971 [details] [review] [PATCH gtk-3-22] wayland: Check for subsurface looking up the toplevel
Same patch applies cleanly on master as well.
Created attachment 340973 [details] [review] [PATCH gtk-3-22] wayland: Check for subsurface looking up the toplevel (attach the correct patch for gtk+ this time!)
Review of attachment 340973 [details] [review]: Looks reasonable to me.
Comment on attachment 340973 [details] [review] [PATCH gtk-3-22] wayland: Check for subsurface looking up the toplevel attachment 340973 [details] [review] pushed to master as commit bd45199 - [PATCH] wayland: Check for subsurface looking up the toplevel attachment 340973 [details] [review] pushed to branch gtk-3-22 as commit 57a1456 - [PATCH] wayland: Check for subsurface looking up the toplevel