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:
Tamir Zahavi-Brunner 2020-09-07 01:44:13 +03:00 committed by Simon Ser
parent 4799cb0960
commit 96578aa91e
7 changed files with 91 additions and 15 deletions

View file

@ -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;
}