diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index 67b9551af..39738af92 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -713,7 +713,7 @@ xdg_shell_use_unstable_version (struct wl_client *client, struct wl_resource *resource, int32_t version) { - if (version != META_XDG_SHELL_VERSION) + if (version != XDG_SHELL_VERSION_CURRENT) g_warning ("Bad xdg_shell version: %d", version); } @@ -1086,8 +1086,13 @@ bind_xdg_shell (struct wl_client *client, { struct wl_resource *resource; - resource = wl_resource_create (client, &xdg_shell_interface, - MIN (META_XDG_SHELL_VERSION, version), id); + if (version != 1) + { + g_warning ("using xdg-shell without stable version 1\n"); + return; + } + + resource = wl_resource_create (client, &xdg_shell_interface, 1, id); wl_resource_set_implementation (resource, &meta_wayland_xdg_shell_interface, data, NULL); } @@ -1466,8 +1471,7 @@ void meta_wayland_init_shell (MetaWaylandCompositor *compositor) { if (wl_global_create (compositor->wayland_display, - &xdg_shell_interface, - META_XDG_SHELL_VERSION, + &xdg_shell_interface, 1, compositor, bind_xdg_shell) == NULL) g_error ("Failed to register a global xdg-shell object"); diff --git a/src/wayland/meta-wayland-versions.h b/src/wayland/meta-wayland-versions.h index 531cbd4b9..e2d608c86 100644 --- a/src/wayland/meta-wayland-versions.h +++ b/src/wayland/meta-wayland-versions.h @@ -41,7 +41,6 @@ #define META_WL_OUTPUT_VERSION 2 #define META_XSERVER_VERSION 1 #define META_GTK_SHELL_VERSION 1 -#define META_XDG_SHELL_VERSION 1 #define META_WL_SUBCOMPOSITOR_VERSION 1 /* Slave objects (version inherited from a master object) */