shell: Make sure the shell implementation and protocol versions match

This commit is contained in:
Kristian Høgsberg
2013-12-08 22:27:11 -08:00
parent 1e65840b61
commit 8d344a0548
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -3421,6 +3421,9 @@ xdg_shell_unversioned_dispatch(const void *implementation,
#define XDG_SERVER_VERSION 1
static_assert(XDG_SERVER_VERSION == XDG_SHELL_VERSION_CURRENT,
"shell implementation doesn't match protocol version");
if (args[0].i != XDG_SERVER_VERSION) {
wl_resource_post_error(resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,