wayland: Check for subsurface looking up the toplevel
gdk_window_get_toplevel() walks up the windows tree looking for the corresponding toplevel window, but needs to account for subsurfaces as well on Wayland. https://bugzilla.gnome.org/show_bug.cgi?id=775319
This commit is contained in:
@@ -2454,7 +2454,8 @@ gdk_window_get_toplevel (GdkWindow *window)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
|
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
|
||||||
|
|
||||||
while (window->window_type == GDK_WINDOW_CHILD)
|
while (window->window_type == GDK_WINDOW_CHILD ||
|
||||||
|
window->window_type == GDK_WINDOW_SUBSURFACE)
|
||||||
{
|
{
|
||||||
if (gdk_window_is_toplevel (window))
|
if (gdk_window_is_toplevel (window))
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user