summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index 01e5991..0b44b56 100644
--- a/src/util.c
+++ b/src/util.c
@@ -249,17 +249,18 @@ struct binding_keyboard_grab {
static void
binding_key(struct wl_keyboard_grab *grab,
- uint32_t time, uint32_t key, uint32_t state)
+ uint32_t time, uint32_t key, uint32_t state_w)
{
struct binding_keyboard_grab *b =
container_of(grab, struct binding_keyboard_grab, grab);
struct wl_resource *resource;
struct wl_display *display;
+ enum wl_keyboard_key_state state = state_w;
uint32_t serial;
resource = grab->keyboard->focus_resource;
if (key == b->key) {
- if (!state) {
+ if (state == WL_KEYBOARD_KEY_STATE_RELEASED) {
wl_keyboard_end_grab(grab->keyboard);
free(b);
}