From ca24c215eea64430a69fd870f4e9abc47d9f671e Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Tue, 1 Dec 2020 17:14:59 +0000 Subject: [PATCH] Use enum wl_keyboard_key_state In support of wlroots commit 7693f61d (which is after v0.12) s/WLR_KEY_RELEASED/WL_KEYBOARD_KEY_STATE_RELEASED/ s/WLR_KEY_PRESSED/WL_KEYBOARD_KEY_STATE_PRESSED/ This change is backwards compatible, albeit with some compiler warnings --- src/keyboard.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index 6d6263d6..267d7fca 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -50,11 +50,11 @@ keyboard_key_notify(struct wl_listener *listener, void *data) if (server->cycle_view) { if ((syms[0] == XKB_KEY_Alt_L) && - event->state == WLR_KEY_RELEASED) { + event->state == WL_KEYBOARD_KEY_STATE_RELEASED) { /* end cycle */ desktop_focus_view(&server->seat, server->cycle_view); server->cycle_view = NULL; - } else if (event->state == WLR_KEY_PRESSED) { + } else if (event->state == WL_KEYBOARD_KEY_STATE_PRESSED) { /* cycle to next */ server->cycle_view = desktop_cycle_view(server, server->cycle_view); @@ -63,7 +63,7 @@ keyboard_key_notify(struct wl_listener *listener, void *data) } /* Handle compositor key bindings */ - if (event->state == WLR_KEY_PRESSED) { + if (event->state == WL_KEYBOARD_KEY_STATE_PRESSED) { for (int i = 0; i < nsyms; i++) { handled = handle_keybinding(server, modifiers, syms[i]); }