From 64cf87cfe1c1d9ff8107181cb26bd41b7bc242d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 1 Jun 2015 17:22:57 +0800 Subject: [PATCH] MetaWaylandSurface: Create the window when creating wl_shell_surface Some clients will do things like set_toplevel before committing the buffer, so we need to have a window to manipulate before that. https://bugzilla.gnome.org/show_bug.cgi?id=750256 --- src/wayland/meta-wayland-surface.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index cfd112d7a..42ebab46b 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -1539,6 +1539,7 @@ wl_shell_get_shell_surface (struct wl_client *client, struct wl_resource *surface_resource) { MetaWaylandSurface *surface = wl_resource_get_user_data (surface_resource); + MetaWindow *window; if (surface->wl_shell_surface != NULL) { @@ -1556,6 +1557,9 @@ wl_shell_get_shell_surface (struct wl_client *client, surface->wl_shell_surface = wl_resource_create (client, &wl_shell_surface_interface, wl_resource_get_version (resource), id); wl_resource_set_implementation (surface->wl_shell_surface, &meta_wayland_wl_shell_surface_interface, surface, wl_shell_surface_destructor); + + window = meta_window_wayland_new (meta_get_display (), surface); + meta_wayland_surface_set_window (surface, window); } static const struct wl_shell_interface meta_wayland_wl_shell_interface = {