aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/commands/default_border.c8
-rw-r--r--sway/commands/move.c10
2 files changed, 10 insertions, 8 deletions
diff --git a/sway/commands/default_border.c b/sway/commands/default_border.c
index fcd2c075..2e356d3d 100644
--- a/sway/commands/default_border.c
+++ b/sway/commands/default_border.c
@@ -15,12 +15,12 @@ struct cmd_results *cmd_default_border(int argc, char **argv) {
15 config->border = B_NORMAL; 15 config->border = B_NORMAL;
16 } else if (strcmp(argv[0], "pixel") == 0) { 16 } else if (strcmp(argv[0], "pixel") == 0) {
17 config->border = B_PIXEL; 17 config->border = B_PIXEL;
18 if (argc == 2) {
19 config->border_thickness = atoi(argv[1]);
20 }
21 } else { 18 } else {
22 return cmd_results_new(CMD_INVALID, "default_border", 19 return cmd_results_new(CMD_INVALID, "default_border",
23 "Expected 'default_border <none|normal|pixel>' or 'default_border pixel <px>'"); 20 "Expected 'default_border <none|normal|pixel>' or 'default_border <normal|pixel> <px>'");
21 }
22 if (argc == 2) {
23 config->border_thickness = atoi(argv[1]);
24 } 24 }
25 25
26 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 26 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
diff --git a/sway/commands/move.c b/sway/commands/move.c
index a5273ba4..890b1a8c 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -90,12 +90,14 @@ static struct cmd_results *cmd_move_container(struct sway_container *current,
90 } 90 }
91 free(ws_name); 91 free(ws_name);
92 struct sway_container *old_parent = current->parent; 92 struct sway_container *old_parent = current->parent;
93 struct sway_container *focus = seat_get_focus_inactive( 93 struct sway_container *destination = seat_get_focus_inactive(
94 config->handler_context.seat, ws); 94 config->handler_context.seat, ws);
95 container_move_to(current, focus); 95 container_move_to(current, destination);
96 seat_set_focus(config->handler_context.seat, old_parent); 96 struct sway_container *focus = seat_get_focus_inactive(
97 config->handler_context.seat, old_parent);
98 seat_set_focus(config->handler_context.seat, focus);
97 container_reap_empty(old_parent); 99 container_reap_empty(old_parent);
98 container_reap_empty(focus->parent); 100 container_reap_empty(destination->parent);
99 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 101 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
100 } else if (strcasecmp(argv[1], "to") == 0 102 } else if (strcasecmp(argv[1], "to") == 0
101 && strcasecmp(argv[2], "output") == 0) { 103 && strcasecmp(argv[2], "output") == 0) {