xdg_shell_ping,
};
+#define XDG_VERSION 2 /* The version of xdg-shell that we implement */
+#ifdef static_assert
+static_assert(XDG_VERSION == XDG_SHELL_VERSION_CURRENT,
+ "Interface version doesn't match implementation version");
+#endif
+
static void
registry_handle_global(void *data, struct wl_registry *registry,
uint32_t name, const char *interface, uint32_t version)
d->shell = wl_registry_bind(registry, name,
&xdg_shell_interface, 1);
xdg_shell_add_listener(d->shell, &xdg_shell_listener, d);
- xdg_shell_use_unstable_version(d->shell, 1);
+ xdg_shell_use_unstable_version(d->shell, XDG_VERSION);
} else if (strcmp(interface, "wl_seat") == 0) {
d->seat = wl_registry_bind(registry, name,
&wl_seat_interface, 1);
xdg_shell_ping,
};
+#define XDG_VERSION 2 /* The version of xdg-shell that we implement */
+#ifdef static_assert
+static_assert(XDG_VERSION == XDG_SHELL_VERSION_CURRENT,
+ "Interface version doesn't match implementation version");
+#endif
+
static void
registry_handle_global(void *data, struct wl_registry *registry,
uint32_t id, const char *interface, uint32_t version)
} else if (strcmp(interface, "xdg_shell") == 0) {
d->shell = wl_registry_bind(registry,
id, &xdg_shell_interface, 1);
- xdg_shell_use_unstable_version(d->shell, 1);
+ xdg_shell_use_unstable_version(d->shell, XDG_VERSION);
xdg_shell_add_listener(d->shell, &xdg_shell_listener, d);
} else if (strcmp(interface, "wl_shm") == 0) {
d->shm = wl_registry_bind(registry,
xdg_shell_ping,
};
+#define XDG_VERSION 2 /* The version of xdg-shell that we implement */
+#ifdef static_assert
+static_assert(XDG_VERSION == XDG_SHELL_VERSION_CURRENT,
+ "Interface version doesn't match implementation version");
+#endif
+
static void
registry_handle_global(void *data, struct wl_registry *registry, uint32_t id,
const char *interface, uint32_t version)
} else if (strcmp(interface, "xdg_shell") == 0) {
d->xdg_shell = wl_registry_bind(registry, id,
&xdg_shell_interface, 1);
- xdg_shell_use_unstable_version(d->xdg_shell, XDG_SHELL_VERSION_CURRENT);
+ xdg_shell_use_unstable_version(d->xdg_shell, XDG_VERSION);
xdg_shell_add_listener(d->xdg_shell, &xdg_shell_listener, d);
} else if (strcmp(interface, "text_cursor_position") == 0) {
d->text_cursor_position =
return 0;
}
-#define XDG_SERVER_VERSION 1
+#define XDG_SERVER_VERSION 2
static_assert(XDG_SERVER_VERSION == XDG_SHELL_VERSION_CURRENT,
"shell implementation doesn't match protocol version");
Use this enum to check the protocol version, and it will be updated
automatically.
</description>
- <entry name="current" value="1" summary="Always the latest version"/>
+ <entry name="current" value="2" summary="Always the latest version"/>
</enum>