From 36575a44249631ee3785e53d55d1361e0b868a2c Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Tue, 15 Nov 2016 14:49:03 +0100 Subject: [PATCH] gdkwindow: Allow native subsurface for all parents Under Wayland, a subsurface can have another surface as parent, but gdk would not allow native windows if the parent is not the root window. Allow native subsurface for all parent under Wayland, not just for the root window. https://bugzilla.gnome.org/show_bug.cgi?id=774475 --- gdk/gdkwindow.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 3c3b0a071c..0fd2023791 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -1220,6 +1220,11 @@ gdk_window_new (GdkWindow *parent, if (window->parent->window_type == GDK_WINDOW_ROOT) native = TRUE; /* Always use native windows for toplevels */ +#ifdef GDK_WINDOWING_WAYLAND + if (window->window_type == GDK_WINDOW_SUBSURFACE) + native = TRUE; /* Always use native windows for subsurfaces as well */ +#endif + if (native) { event_mask = get_native_event_mask (window);