diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index c5424598bd..21369de2c1 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -69,6 +69,8 @@ * ]| */ +#define SUPPORTED_GTK_SHELL_VERSION 1 + static void _gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *wayland_display); G_DEFINE_TYPE (GdkWaylandDisplay, gdk_wayland_display, GDK_TYPE_DISPLAY) @@ -180,9 +182,13 @@ gdk_registry_handle_global (void *data, } else if (strcmp (interface, "gtk_shell") == 0) { - display_wayland->gtk_shell = - wl_registry_bind (display_wayland->wl_registry, id, >k_shell_interface, 1); - _gdk_wayland_screen_set_has_gtk_shell (display_wayland->screen); + if (version == SUPPORTED_GTK_SHELL_VERSION) + { + display_wayland->gtk_shell = + wl_registry_bind(display_wayland->wl_registry, id, + >k_shell_interface, SUPPORTED_GTK_SHELL_VERSION); + _gdk_wayland_screen_set_has_gtk_shell (display_wayland->screen); + } } else if (strcmp (interface, "wl_output") == 0) { diff --git a/gdk/wayland/protocol/gtk-shell.xml b/gdk/wayland/protocol/gtk-shell.xml index cd6625913b..bed61d6b29 100644 --- a/gdk/wayland/protocol/gtk-shell.xml +++ b/gdk/wayland/protocol/gtk-shell.xml @@ -1,12 +1,20 @@ + + gtk_shell is a protocol extension providing additional features for + clients implementing it. It is not backward compatible, and a client must + always only bind to the specific version it implements. If a client binds + to a version different from the version the server provides, an error will + be raised. + + - +