aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/floating_modifier.c
diff options
context:
space:
mode:
authorLibravatar Alex Maese <memaese@hotmail.com>2020-01-19 11:10:30 -0600
committerLibravatar Drew DeVault <sir@cmpwn.com>2020-01-20 09:19:04 -0700
commit86ee240a4a6a958b4728b3613ce05edd884caf45 (patch)
treef50b0aa7919f4313ff3ac06ee37e6f6403fdb314 /sway/commands/floating_modifier.c
parentCheck argc>0 before strcasecmp. Should shortcircuit (diff)
downloadsway-86ee240a4a6a958b4728b3613ce05edd884caf45.tar.gz
sway-86ee240a4a6a958b4728b3613ce05edd884caf45.tar.zst
sway-86ee240a4a6a958b4728b3613ce05edd884caf45.zip
Add ability to remove the floating modifier
Diffstat (limited to 'sway/commands/floating_modifier.c')
-rw-r--r--sway/commands/floating_modifier.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/commands/floating_modifier.c b/sway/commands/floating_modifier.c
index fd606281..c02bce97 100644
--- a/sway/commands/floating_modifier.c
+++ b/sway/commands/floating_modifier.c
@@ -9,6 +9,11 @@ struct cmd_results *cmd_floating_modifier(int argc, char **argv) {
9 return error; 9 return error;
10 } 10 }
11 11
12 if (strcasecmp(argv[0], "none") == 0) {
13 config->floating_mod = 0;
14 return cmd_results_new(CMD_SUCCESS, NULL);
15 }
16
12 uint32_t mod = get_modifier_mask_by_name(argv[0]); 17 uint32_t mod = get_modifier_mask_by_name(argv[0]);
13 if (!mod) { 18 if (!mod) {
14 return cmd_results_new(CMD_INVALID, "Invalid modifier"); 19 return cmd_results_new(CMD_INVALID, "Invalid modifier");