diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-07-23 20:27:56 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-07-23 20:31:11 -0400 |
commit | f4b882475eee7a81c206c7825616cc4656b2f60b (patch) | |
tree | 38e6ebf81b235424f105dcbcbb194e5e9eac70c0 /sway/commands/floating_modifier.c | |
parent | Implement pid->workspace tracking (diff) | |
parent | Merge pull request #2342 from RyanDwyer/update-cursor (diff) | |
download | sway-f4b882475eee7a81c206c7825616cc4656b2f60b.tar.gz sway-f4b882475eee7a81c206c7825616cc4656b2f60b.tar.zst sway-f4b882475eee7a81c206c7825616cc4656b2f60b.zip |
Merge branch 'master' into pid-workspaces
Diffstat (limited to 'sway/commands/floating_modifier.c')
-rw-r--r-- | sway/commands/floating_modifier.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sway/commands/floating_modifier.c b/sway/commands/floating_modifier.c new file mode 100644 index 00000000..9432c9f1 --- /dev/null +++ b/sway/commands/floating_modifier.c | |||
@@ -0,0 +1,20 @@ | |||
1 | #include "sway/commands.h" | ||
2 | #include "sway/config.h" | ||
3 | #include "util.h" | ||
4 | |||
5 | struct cmd_results *cmd_floating_modifier(int argc, char **argv) { | ||
6 | struct cmd_results *error = NULL; | ||
7 | if ((error = checkarg(argc, "floating_modifier", EXPECTED_EQUAL_TO, 1))) { | ||
8 | return error; | ||
9 | } | ||
10 | |||
11 | uint32_t mod = get_modifier_mask_by_name(argv[0]); | ||
12 | if (!mod) { | ||
13 | return cmd_results_new(CMD_INVALID, "floating_modifier", | ||
14 | "Invalid modifier"); | ||
15 | } | ||
16 | |||
17 | config->floating_mod = mod; | ||
18 | |||
19 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | ||
20 | } | ||