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
This commit is contained in:
Olivier Fourdan
2016-11-15 14:49:03 +01:00
committed by Matthias Clasen
parent 4805780016
commit 0b46c5b176

View File

@ -1461,6 +1461,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 (gdk_window_is_offscreen (window))
{
_gdk_offscreen_window_new (window, attributes, attributes_mask);