mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
wayland: Use a named #define for the xdg-shell version
This commit is contained in:
parent
ac0b2fdc6f
commit
c9a2a561f8
@ -1118,15 +1118,15 @@ bind_xdg_shell (struct wl_client *client,
|
||||
{
|
||||
XdgShell *xdg_shell;
|
||||
|
||||
if (version != 1)
|
||||
if (version != META_XDG_SHELL_VERSION)
|
||||
{
|
||||
g_warning ("using xdg-shell without stable version 1\n");
|
||||
g_warning ("using xdg-shell without stable version %d\n", META_XDG_SHELL_VERSION);
|
||||
return;
|
||||
}
|
||||
|
||||
xdg_shell = g_slice_new (XdgShell);
|
||||
|
||||
xdg_shell->resource = wl_resource_create (client, &xdg_shell_interface, 1, id);
|
||||
xdg_shell->resource = wl_resource_create (client, &xdg_shell_interface, META_XDG_SHELL_VERSION, id);
|
||||
wl_resource_set_implementation (xdg_shell->resource, &meta_wayland_xdg_shell_interface, data, NULL);
|
||||
|
||||
xdg_shell->client_destroy_listener.notify = xdg_shell_handle_client_destroy;
|
||||
@ -1752,7 +1752,8 @@ void
|
||||
meta_wayland_shell_init (MetaWaylandCompositor *compositor)
|
||||
{
|
||||
if (wl_global_create (compositor->wayland_display,
|
||||
&xdg_shell_interface, 1,
|
||||
&xdg_shell_interface,
|
||||
META_XDG_SHELL_VERSION,
|
||||
compositor, bind_xdg_shell) == NULL)
|
||||
g_error ("Failed to register a global xdg-shell object");
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
/* Global/master objects (version exported by wl_registry and negotiated through bind) */
|
||||
#define META_WL_COMPOSITOR_VERSION 3
|
||||
#define META_WL_DATA_DEVICE_MANAGER_VERSION 1
|
||||
#define META_XDG_SHELL_VERSION 1
|
||||
#define META_WL_SHELL_VERSION 1
|
||||
#define META_WL_SEAT_VERSION 3
|
||||
#define META_WL_OUTPUT_VERSION 2
|
||||
|
Loading…
Reference in New Issue
Block a user