diff options
author | Tamir Zahavi-Brunner <tamir.z3@gmail.com> | 2020-09-07 01:44:13 +0300 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-10-30 09:59:54 +0100 |
commit | 96578aa91e9856bfb3e2d26fb7a625ff7c9b79e3 (patch) | |
tree | ac763cde133816f3bd8218eccbc352416ce88a5f /sway/input/keyboard.c | |
parent | output: Revert implementation of evacuate_sticky() (diff) | |
download | sway-96578aa91e9856bfb3e2d26fb7a625ff7c9b79e3.tar.gz sway-96578aa91e9856bfb3e2d26fb7a625ff7c9b79e3.tar.zst sway-96578aa91e9856bfb3e2d26fb7a625ff7c9b79e3.zip |
hide_cursor: Add an option to hide when typing
Add an option for the `hide_cursor` command to hide the cursor when
typing, i.e. whenever a key is pressed.
Diffstat (limited to 'sway/input/keyboard.c')
-rw-r--r-- | sway/input/keyboard.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index 541fc90d..ae30e83a 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include "sway/input/input-manager.h" | 13 | #include "sway/input/input-manager.h" |
14 | #include "sway/input/keyboard.h" | 14 | #include "sway/input/keyboard.h" |
15 | #include "sway/input/seat.h" | 15 | #include "sway/input/seat.h" |
16 | #include "sway/input/cursor.h" | ||
16 | #include "sway/ipc-server.h" | 17 | #include "sway/ipc-server.h" |
17 | #include "log.h" | 18 | #include "log.h" |
18 | 19 | ||
@@ -392,6 +393,10 @@ static void handle_key_event(struct sway_keyboard *keyboard, | |||
392 | keyboard_shortcuts_inhibitor_get_for_focused_surface(seat); | 393 | keyboard_shortcuts_inhibitor_get_for_focused_surface(seat); |
393 | bool shortcuts_inhibited = sway_inhibitor && sway_inhibitor->inhibitor->active; | 394 | bool shortcuts_inhibited = sway_inhibitor && sway_inhibitor->inhibitor->active; |
394 | 395 | ||
396 | if (event->state == WLR_KEY_PRESSED) { | ||
397 | cursor_notify_key_press(seat->cursor); | ||
398 | } | ||
399 | |||
395 | // Identify new keycode, raw keysym(s), and translated keysym(s) | 400 | // Identify new keycode, raw keysym(s), and translated keysym(s) |
396 | struct key_info keyinfo; | 401 | struct key_info keyinfo; |
397 | update_keyboard_state(keyboard, event->keycode, event->state, &keyinfo); | 402 | update_keyboard_state(keyboard, event->keycode, event->state, &keyinfo); |