Commit f46a74c68fb081dd3b6cd04fdcc782a914e75d5b Parent: 82f1ffef6d67cd1f5f5cf588e69353e2ed665113 Author: mcol <mcol@posteo.net> Date: 2021-01-27 22:13:30 +0000 Committer: mcol <mcol@posteo.net> Committed: 2021-01-27 22:13:30 +0000 remove unnecessary lines
src/keyboard.c Modified
@@ -17,7 +17,6 @@ uint32_t modifiers = wlr_keyboard_get_modifiers(keyboard->device->keyboard); struct binding *kb; - bool handled = false; if ((modifiers & wimp.mod)) { modifiers &= ~wimp.mod; wl_list_for_each(kb, &wimp.mouse_bindings, link) { @@ -31,13 +30,12 @@ break; } wimp.cursor_mode = CURSOR_MOD; - handled = true; + return; } } } - if (!handled) { - wimp.cursor_mode = CURSOR_PASSTHROUGH; - } + + wimp.cursor_mode = CURSOR_PASSTHROUGH; } @@ -46,12 +44,12 @@ struct wlr_event_keyboard_key *event = data; struct wlr_seat *seat = wimp.seat; - /* Translate libinput keycode -> xkbcommon */ - uint32_t keycode = event->keycode + 8; - /* Get a list of keysyms based on the keymap for this keyboard */ const xkb_keysym_t *syms; int nsyms = xkb_state_key_get_syms( - keyboard->device->keyboard->xkb_state, keycode, &syms); + keyboard->device->keyboard->xkb_state, + event->keycode + 8, + &syms + ); if (event->state == WLR_KEY_PRESSED) { if (wimp.mark_waiting) {