diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-08-01 13:39:25 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-08-01 13:39:25 +0000 |
| commit | a0269385473f0a3ee3d829aee4be86df9a6b8a35 (patch) | |
| tree | a99063b351ac888d5fe42f03b3c5b2b71c728bc9 /input.c | |
| parent | Revert "slave: use an event FD to communicate errors after fork before exec" (diff) | |
input: don't hide cursor if key is 'shift'
Since shift is used to enable selecting text in mouse-grabbing
applications, hiding the cursor in this case is counter productive.
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -696,15 +696,17 @@ keyboard_key(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, return; } - if (state == XKB_KEY_DOWN && term->conf->cursor.hide_when_typing) { - seat->pointer.hidden = true; - term_xcursor_update_for_seat(term, seat); - } - key += 8; bool should_repeat = xkb_keymap_key_repeats(seat->kbd.xkb_keymap, key); xkb_keysym_t sym = xkb_state_key_get_one_sym(seat->kbd.xkb_state, key); + if (state == XKB_KEY_DOWN && term->conf->cursor.hide_when_typing && + sym != XKB_KEY_Shift_L && sym != XKB_KEY_Shift_R) + { + seat->pointer.hidden = true; + term_xcursor_update_for_seat(term, seat); + } + #if 0 char foo[100]; xkb_keysym_get_name(sym, foo, sizeof(foo)); |
