wayland-surface: Don't require we manually bump the version for xdg-shell
It's in the protocol as an enum.
This commit is contained in:
parent
bd1bec5617
commit
11aa3c030b
@ -713,7 +713,7 @@ xdg_shell_use_unstable_version (struct wl_client *client,
|
|||||||
struct wl_resource *resource,
|
struct wl_resource *resource,
|
||||||
int32_t version)
|
int32_t version)
|
||||||
{
|
{
|
||||||
if (version != META_XDG_SHELL_VERSION)
|
if (version != XDG_SHELL_VERSION_CURRENT)
|
||||||
g_warning ("Bad xdg_shell version: %d", version);
|
g_warning ("Bad xdg_shell version: %d", version);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1086,8 +1086,13 @@ bind_xdg_shell (struct wl_client *client,
|
|||||||
{
|
{
|
||||||
struct wl_resource *resource;
|
struct wl_resource *resource;
|
||||||
|
|
||||||
resource = wl_resource_create (client, &xdg_shell_interface,
|
if (version != 1)
|
||||||
MIN (META_XDG_SHELL_VERSION, version), id);
|
{
|
||||||
|
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);
|
wl_resource_set_implementation (resource, &meta_wayland_xdg_shell_interface, data, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1466,8 +1471,7 @@ void
|
|||||||
meta_wayland_init_shell (MetaWaylandCompositor *compositor)
|
meta_wayland_init_shell (MetaWaylandCompositor *compositor)
|
||||||
{
|
{
|
||||||
if (wl_global_create (compositor->wayland_display,
|
if (wl_global_create (compositor->wayland_display,
|
||||||
&xdg_shell_interface,
|
&xdg_shell_interface, 1,
|
||||||
META_XDG_SHELL_VERSION,
|
|
||||||
compositor, bind_xdg_shell) == NULL)
|
compositor, bind_xdg_shell) == NULL)
|
||||||
g_error ("Failed to register a global xdg-shell object");
|
g_error ("Failed to register a global xdg-shell object");
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
#define META_WL_OUTPUT_VERSION 2
|
#define META_WL_OUTPUT_VERSION 2
|
||||||
#define META_XSERVER_VERSION 1
|
#define META_XSERVER_VERSION 1
|
||||||
#define META_GTK_SHELL_VERSION 1
|
#define META_GTK_SHELL_VERSION 1
|
||||||
#define META_XDG_SHELL_VERSION 1
|
|
||||||
#define META_WL_SUBCOMPOSITOR_VERSION 1
|
#define META_WL_SUBCOMPOSITOR_VERSION 1
|
||||||
|
|
||||||
/* Slave objects (version inherited from a master object) */
|
/* Slave objects (version inherited from a master object) */
|
||||||
|
Loading…
Reference in New Issue
Block a user