aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/floating_mod.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-12 20:19:54 -0400
committerDrew DeVault <sir@cmpwn.com>2018-04-12 20:19:54 -0400
commitcd1b32453a9296c18b28bff71607aeb22987b5cd (patch)
treec653c6d525b471914c01a9d7ae543f521b6138ed /sway/commands/floating_mod.c
parent8e06985cc1b479724446fba752e0fecfb998e87b (diff)
parent5785170421dc38437acde8bb61068cd16fda716c (diff)
downloadsway-cd1b32453a9296c18b28bff71607aeb22987b5cd.tar.xz
Merge branch 'wlroots'
Diffstat (limited to 'sway/commands/floating_mod.c')
-rw-r--r--sway/commands/floating_mod.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/sway/commands/floating_mod.c b/sway/commands/floating_mod.c
deleted file mode 100644
index b8e81ab9..00000000
--- a/sway/commands/floating_mod.c
+++ /dev/null
@@ -1,42 +0,0 @@
-#include <string.h>
-#include <strings.h>
-#include "sway/commands.h"
-#include "sway/input_state.h"
-#include "list.h"
-#include "log.h"
-#include "stringop.h"
-#include "util.h"
-
-struct cmd_results *cmd_floating_mod(int argc, char **argv) {
- struct cmd_results *error = NULL;
- if ((error = checkarg(argc, "floating_modifier", EXPECTED_AT_LEAST, 1))) {
- return error;
- }
- int i;
- list_t *split = split_string(argv[0], "+");
- config->floating_mod = 0;
-
- // set modifier keys
- for (i = 0; i < split->length; ++i) {
- config->floating_mod |= get_modifier_mask_by_name(split->items[i]);
- }
- free_flat_list(split);
- if (!config->floating_mod) {
- error = cmd_results_new(CMD_INVALID, "floating_modifier", "Unknown keys %s", argv[0]);
- return error;
- }
-
- if (argc >= 2) {
- if (strcasecmp("inverse", argv[1]) == 0) {
- config->dragging_key = M_RIGHT_CLICK;
- config->resizing_key = M_LEFT_CLICK;
- } else if (strcasecmp("normal", argv[1]) == 0) {
- config->dragging_key = M_LEFT_CLICK;
- config->resizing_key = M_RIGHT_CLICK;
- } else {
- error = cmd_results_new(CMD_INVALID, "floating_modifier", "Invalid definition %s", argv[1]);
- return error;
- }
- }
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
-}