diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-02 11:57:06 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-04-02 11:57:06 -0400 |
commit | e3689dd5a93b4f4ae62637a2b81797335aafdcaf (patch) | |
tree | d2b9dd4816efdf861e71bcd1eff6a70928e59dc6 /sway/commands/move.c | |
parent | Partially implement move command (diff) | |
download | sway-e3689dd5a93b4f4ae62637a2b81797335aafdcaf.tar.gz sway-e3689dd5a93b4f4ae62637a2b81797335aafdcaf.tar.zst sway-e3689dd5a93b4f4ae62637a2b81797335aafdcaf.zip |
Fixes regarding @emersion's feedback
Diffstat (limited to 'sway/commands/move.c')
-rw-r--r-- | sway/commands/move.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c index 222ef314..ab959b77 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c | |||
@@ -106,7 +106,9 @@ static struct cmd_results *cmd_move_container(struct sway_container *current, | |||
106 | // We've never been to this output before | 106 | // We've never been to this output before |
107 | focus = destination->children->items[0]; | 107 | focus = destination->children->items[0]; |
108 | } | 108 | } |
109 | struct sway_container *old_parent = current->parent; | ||
109 | container_move_to(current, focus); | 110 | container_move_to(current, focus); |
111 | sway_seat_set_focus(config->handler_context.seat, old_parent); | ||
110 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 112 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
111 | } | 113 | } |
112 | return cmd_results_new(CMD_INVALID, "move", expected_syntax); | 114 | return cmd_results_new(CMD_INVALID, "move", expected_syntax); |
@@ -149,7 +151,8 @@ struct cmd_results *cmd_move(int argc, char **argv) { | |||
149 | char *inv; | 151 | char *inv; |
150 | move_amt = (int)strtol(argv[1], &inv, 10); | 152 | move_amt = (int)strtol(argv[1], &inv, 10); |
151 | if (*inv != '\0' && strcasecmp(inv, "px") != 0) { | 153 | if (*inv != '\0' && strcasecmp(inv, "px") != 0) { |
152 | move_amt = 10; | 154 | return cmd_results_new(CMD_FAILURE, "move", |
155 | "Invalid distance specified"); | ||
153 | } | 156 | } |
154 | } | 157 | } |
155 | 158 | ||