aboutsummaryrefslogtreecommitdiffstats
path: root/sway/config
diff options
context:
space:
mode:
authorLibravatar Tamir Zahavi-Brunner <tamir.z3@gmail.com>2020-09-07 01:44:13 +0300
committerLibravatar Simon Ser <contact@emersion.fr>2020-10-30 09:59:54 +0100
commit96578aa91e9856bfb3e2d26fb7a625ff7c9b79e3 (patch)
treeac763cde133816f3bd8218eccbc352416ce88a5f /sway/config
parentoutput: Revert implementation of evacuate_sticky() (diff)
downloadsway-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/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) {
29 return NULL; 29 return NULL;
30 } 30 }
31 seat->hide_cursor_timeout = -1; 31 seat->hide_cursor_timeout = -1;
32 seat->hide_cursor_when_typing = HIDE_WHEN_TYPING_DEFAULT;
32 seat->allow_constrain = CONSTRAIN_DEFAULT; 33 seat->allow_constrain = CONSTRAIN_DEFAULT;
33 seat->shortcuts_inhibit = SHORTCUTS_INHIBIT_DEFAULT; 34 seat->shortcuts_inhibit = SHORTCUTS_INHIBIT_DEFAULT;
34 seat->keyboard_grouping = KEYBOARD_GROUP_DEFAULT; 35 seat->keyboard_grouping = KEYBOARD_GROUP_DEFAULT;
@@ -151,6 +152,10 @@ void merge_seat_config(struct seat_config *dest, struct seat_config *source) {
151 dest->hide_cursor_timeout = source->hide_cursor_timeout; 152 dest->hide_cursor_timeout = source->hide_cursor_timeout;
152 } 153 }
153 154
155 if (source->hide_cursor_when_typing != HIDE_WHEN_TYPING_DEFAULT) {
156 dest->hide_cursor_when_typing = source->hide_cursor_when_typing;
157 }
158
154 if (source->allow_constrain != CONSTRAIN_DEFAULT) { 159 if (source->allow_constrain != CONSTRAIN_DEFAULT) {
155 dest->allow_constrain = source->allow_constrain; 160 dest->allow_constrain = source->allow_constrain;
156 } 161 }