diff options
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sway/commands.c b/sway/commands.c index 73f245c1..aaacf0fc 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -1011,7 +1011,8 @@ static struct cmd_results *cmd_move(int argc, char **argv) { | |||
1011 | } | 1011 | } |
1012 | const char* expected_syntax = "Expected 'move <left|right|up|down>' or " | 1012 | const char* expected_syntax = "Expected 'move <left|right|up|down>' or " |
1013 | "'move <container|window> to workspace <name>' or " | 1013 | "'move <container|window> to workspace <name>' or " |
1014 | "'move <container|window|workspace> to output <name|direction>'"; | 1014 | "'move <container|window|workspace> to output <name|direction>' or " |
1015 | "'move position mouse'"; | ||
1015 | swayc_t *view = get_focused_container(&root_container); | 1016 | swayc_t *view = get_focused_container(&root_container); |
1016 | 1017 | ||
1017 | if (strcasecmp(argv[0], "left") == 0) { | 1018 | if (strcasecmp(argv[0], "left") == 0) { |
@@ -1115,7 +1116,14 @@ static struct cmd_results *cmd_move(int argc, char **argv) { | |||
1115 | focused = swayc_active_workspace(); | 1116 | focused = swayc_active_workspace(); |
1116 | } | 1117 | } |
1117 | set_focused_container(focused); | 1118 | set_focused_container(focused); |
1118 | } else if (strcasecmp(argv[0], "position") == 0 && strcasecmp(argv[1], "mouse") == 0) { | 1119 | } else if (strcasecmp(argv[0], "position") == 0) { |
1120 | if ((error = checkarg(argc, "move workspace", EXPECTED_EQUAL_TO, 2))) { | ||
1121 | return error; | ||
1122 | } | ||
1123 | if (strcasecmp(argv[1], "mouse")) { | ||
1124 | return cmd_results_new(CMD_INVALID, "move", expected_syntax); | ||
1125 | } | ||
1126 | |||
1119 | if (view->is_floating) { | 1127 | if (view->is_floating) { |
1120 | swayc_t *output = swayc_parent_by_type(view, C_OUTPUT); | 1128 | swayc_t *output = swayc_parent_by_type(view, C_OUTPUT); |
1121 | struct wlc_geometry g; | 1129 | struct wlc_geometry g; |