From d2ba7d75c3d5909f57dd778989bffaa984878990 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 3 Jul 2013 16:19:39 +0100 Subject: [PATCH] wayland: Create the Wayland surface for the window on impl creation Ths allows the retrieval of the wl_surface before the window is shown. The surface is still created in the original places since the surface and shell surface is destroyed when the surface is programmatically hidden. --- gdk/wayland/gdkwindow-wayland.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index 109e642ded..5e282e5ea5 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -463,6 +463,10 @@ on_monitors_changed (GdkScreen *screen, window_update_scale (window); } + +static void +gdk_wayland_window_create_surface (GdkWindow *window); + void _gdk_wayland_display_create_window_impl (GdkDisplay *display, GdkWindow *window, @@ -515,6 +519,8 @@ _gdk_wayland_display_create_window_impl (GdkDisplay *display, break; } + gdk_wayland_window_create_surface (window); + if (attributes_mask & GDK_WA_TYPE_HINT) gdk_window_set_type_hint (window, attributes->type_hint); @@ -985,7 +991,7 @@ static const struct wl_shell_surface_listener shell_surface_listener = { }; static void -gdk_wayland_window_create_surface (GdkWindow *window) +gdk_wayland_window_create_surface (GdkWindow *window) { GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl); GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));