client: Fix shell unstable version check
Use a static assert to catch mismatch between implementation and interface version. Fix window.c to not use XDG_SHELL_VERSION_CURRENT, which will fail to catch version mismatches. The implementation version must updated manually when the implementation is updated to use the new interface.
This commit is contained in:
@@ -3635,7 +3635,7 @@ xdg_shell_unversioned_dispatch(const void *implementation,
|
||||
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");
|
||||
|
||||
Reference in New Issue
Block a user