Use enum wl_keyboard_key_state instead of integer
Instead of using a uint32_t for state everywhere (except on the wire,
where that's still the call signature), use the new
wl_keyboard_key_state enum, and explicit comparisons.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index 02ebc6c..83bd683 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -607,7 +607,9 @@
struct wayland_input *input = data;
struct wayland_compositor *c = input->compositor;
- notify_key(&c->base.seat->seat, time, key, state);
+ notify_key(&c->base.seat->seat, time, key,
+ state ? WL_KEYBOARD_KEY_STATE_PRESSED :
+ WL_KEYBOARD_KEY_STATE_RELEASED);
}
static void