From 96578aa91e9856bfb3e2d26fb7a625ff7c9b79e3 Mon Sep 17 00:00:00 2001 From: Tamir Zahavi-Brunner Date: Mon, 7 Sep 2020 01:44:13 +0300 Subject: 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. --- sway/config/seat.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sway/config') diff --git a/sway/config/seat.c b/sway/config/seat.c index e2702de5..84260aa3 100644 --- a/sway/config/seat.c +++ b/sway/config/seat.c @@ -29,6 +29,7 @@ struct seat_config *new_seat_config(const char* name) { return NULL; } seat->hide_cursor_timeout = -1; + seat->hide_cursor_when_typing = HIDE_WHEN_TYPING_DEFAULT; seat->allow_constrain = CONSTRAIN_DEFAULT; seat->shortcuts_inhibit = SHORTCUTS_INHIBIT_DEFAULT; seat->keyboard_grouping = KEYBOARD_GROUP_DEFAULT; @@ -151,6 +152,10 @@ void merge_seat_config(struct seat_config *dest, struct seat_config *source) { dest->hide_cursor_timeout = source->hide_cursor_timeout; } + if (source->hide_cursor_when_typing != HIDE_WHEN_TYPING_DEFAULT) { + dest->hide_cursor_when_typing = source->hide_cursor_when_typing; + } + if (source->allow_constrain != CONSTRAIN_DEFAULT) { dest->allow_constrain = source->allow_constrain; } -- cgit v1.2.3