[gtk+/wip/garnacho/window-dragging: 3/7] wayland: Delay wl_subsurface interface creation until the window is shown
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/garnacho/window-dragging: 3/7] wayland: Delay wl_subsurface interface creation until the window is shown
- Date: Wed, 25 Feb 2015 19:39:39 +0000 (UTC)
commit ce034935b823235ba62b0ba5ed2dc27090a09d00
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Feb 25 15:59:26 2015 +0100
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
gdk/wayland/gdkwindow-wayland.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index d10b152..c83cb9b 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -869,9 +869,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
@@ -1187,6 +1184,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);
@@ -1676,7 +1676,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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]