mirror of
https://github.com/swaywm/sway.git
synced 2026-04-03 07:15:39 -04:00
Make pointer disablement when using hide_cursor optional
This commit is contained in:
parent
f5ce4a4413
commit
f23a380ccb
5 changed files with 28 additions and 6 deletions
|
|
@ -31,12 +31,16 @@ struct cmd_results *seat_cmd_hide_cursor(int argc, char **argv) {
|
|||
}
|
||||
seat_config->hide_cursor_timeout = timeout;
|
||||
} else {
|
||||
if (strcmp(argv[0], "when-typing") != 0) {
|
||||
if (strcmp(argv[0], "when-typing") == 0) {
|
||||
seat_config->hide_cursor_when_typing = parse_boolean(argv[1], true) ?
|
||||
HIDE_WHEN_TYPING_ENABLE : HIDE_WHEN_TYPING_DISABLE;
|
||||
} else if (strcmp(argv[0], "but-keep-active") == 0) {
|
||||
seat_config->hide_cursor_but_keep_active = parse_boolean(argv[1], true) ?
|
||||
HIDE_CURSOR_BUT_KEEP_ACTIVE_ENABLE : HIDE_CURSOR_BUT_KEEP_ACTIVE_DISABLE;
|
||||
} else {
|
||||
return cmd_results_new(CMD_INVALID,
|
||||
"Expected 'hide_cursor <timeout>|when-typing [enable|disable]'");
|
||||
"Expected 'hide_cursor <timeout>|when-typing|but-keep-active [enable|disable]'");
|
||||
}
|
||||
seat_config->hide_cursor_when_typing = parse_boolean(argv[1], true) ?
|
||||
HIDE_WHEN_TYPING_ENABLE : HIDE_WHEN_TYPING_DISABLE;
|
||||
}
|
||||
|
||||
return cmd_results_new(CMD_SUCCESS, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue