wayland: Delay wl_subsurface interface creation until the window is shown
It isn't really necessary anytime before, so just make sure it's there only when the window is visible. https://bugzilla.gnome.org/show_bug.cgi?id=743427
This commit is contained in:
@ -877,9 +877,6 @@ gdk_wayland_window_create_surface (GdkWindow *window)
|
||||
|
||||
gdk_wayland_window_sync_opaque_region (window);
|
||||
gdk_wayland_window_sync_input_region (window);
|
||||
|
||||
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_SUBSURFACE)
|
||||
gdk_wayland_window_create_subsurface (window);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1214,6 +1211,9 @@ gdk_wayland_window_show (GdkWindow *window,
|
||||
if (!impl->surface)
|
||||
gdk_wayland_window_create_surface (window);
|
||||
|
||||
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_SUBSURFACE)
|
||||
gdk_wayland_window_create_subsurface (window);
|
||||
|
||||
gdk_wayland_window_map (window);
|
||||
|
||||
_gdk_make_event (window, GDK_MAP, NULL, FALSE);
|
||||
@ -1691,7 +1691,7 @@ gdk_wayland_window_set_transient_for (GdkWindow *window,
|
||||
impl->subsurface = NULL;
|
||||
}
|
||||
|
||||
if (parent)
|
||||
if (parent && gdk_window_is_visible (window))
|
||||
gdk_wayland_window_create_subsurface (window);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user