aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 4e9d2796..ad43c4d5 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -379,14 +379,14 @@ static struct cmd_results *cmd_floating(int argc, char **argv) {
379 379
380static struct cmd_results *cmd_floating_mod(int argc, char **argv) { 380static struct cmd_results *cmd_floating_mod(int argc, char **argv) {
381 struct cmd_results *error = NULL; 381 struct cmd_results *error = NULL;
382 if ((error = checkarg(argc, "floating_modifier", EXPECTED_AT_LEAST, 1))) { 382 if ((error = checkarg(argc, "floating_modifier", EXPECTED_EQUAL_TO, 1))) {
383 return error; 383 return error;
384 } 384 }
385 int i, j; 385 int i, j;
386 list_t *split = split_string(argv[0], "+"); 386 list_t *split = split_string(argv[0], "+");
387 config->floating_mod = 0; 387 config->floating_mod = 0;
388 388
389 // set modifier keys 389 // set modifer keys
390 for (i = 0; i < split->length; ++i) { 390 for (i = 0; i < split->length; ++i) {
391 for (j = 0; j < (int)(sizeof(modifiers) / sizeof(struct modifier_key)); ++j) { 391 for (j = 0; j < (int)(sizeof(modifiers) / sizeof(struct modifier_key)); ++j) {
392 if (strcasecmp(modifiers[j].name, split->items[i]) == 0) { 392 if (strcasecmp(modifiers[j].name, split->items[i]) == 0) {
@@ -399,19 +399,6 @@ static struct cmd_results *cmd_floating_mod(int argc, char **argv) {
399 error = cmd_results_new(CMD_INVALID, "floating_modifier", "Unknown keys %s", argv[0]); 399 error = cmd_results_new(CMD_INVALID, "floating_modifier", "Unknown keys %s", argv[0]);
400 return error; 400 return error;
401 } 401 }
402
403 if (argc >= 2) {
404 if (strcasecmp("inverse", argv[1]) == 0) {
405 config->dragging_key = M_RIGHT_CLICK;
406 config->resizing_key = M_LEFT_CLICK;
407 } else if (strcasecmp("normal", argv[1]) == 0) {
408 config->dragging_key = M_LEFT_CLICK;
409 config->resizing_key = M_RIGHT_CLICK;
410 } else {
411 error = cmd_results_new(CMD_INVALID, "floating_modifier", "Invalid definition %s", argv[1]);
412 return error;
413 }
414 }
415 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 402 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
416} 403}
417 404