mirror of
https://github.com/swaywm/sway.git
synced 2026-03-15 05:34:12 -04:00
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.
This commit is contained in:
parent
4799cb0960
commit
96578aa91e
7 changed files with 91 additions and 15 deletions
|
|
@ -13,6 +13,7 @@
|
|||
#include "sway/input/input-manager.h"
|
||||
#include "sway/input/keyboard.h"
|
||||
#include "sway/input/seat.h"
|
||||
#include "sway/input/cursor.h"
|
||||
#include "sway/ipc-server.h"
|
||||
#include "log.h"
|
||||
|
||||
|
|
@ -392,6 +393,10 @@ static void handle_key_event(struct sway_keyboard *keyboard,
|
|||
keyboard_shortcuts_inhibitor_get_for_focused_surface(seat);
|
||||
bool shortcuts_inhibited = sway_inhibitor && sway_inhibitor->inhibitor->active;
|
||||
|
||||
if (event->state == WLR_KEY_PRESSED) {
|
||||
cursor_notify_key_press(seat->cursor);
|
||||
}
|
||||
|
||||
// Identify new keycode, raw keysym(s), and translated keysym(s)
|
||||
struct key_info keyinfo;
|
||||
update_keyboard_state(keyboard, event->keycode, event->state, &keyinfo);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue