aboutsummaryrefslogtreecommitdiff
path: root/sway/config
diff options
context:
space:
mode:
authorTamir Zahavi-Brunner <tamir.z3@gmail.com>2020-09-07 01:44:13 +0300
committerSimon Ser <contact@emersion.fr>2020-10-30 09:59:54 +0100
commit96578aa91e9856bfb3e2d26fb7a625ff7c9b79e3 (patch)
treeac763cde133816f3bd8218eccbc352416ce88a5f /sway/config
parent4799cb09606ba8b3cc3969c24637b3c6c9eac485 (diff)
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/config')
-rw-r--r--sway/config/seat.c5
1 files changed, 5 insertions, 0 deletions
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;
}