aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/move.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/move.c')
-rw-r--r--sway/commands/move.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c
index 7d8c1f1a..72e177e8 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -1,4 +1,4 @@
-#define _XOPEN_SOURCE 500
+#define _POSIX_C_SOURCE 200809L
#include <ctype.h>
#include <stdbool.h>
#include <string.h>
@@ -64,7 +64,7 @@ static struct sway_output *output_in_direction(const char *direction_string,
}
}
- return output_by_name(direction_string);
+ return output_by_name_or_id(direction_string);
}
static bool is_parallel(enum sway_container_layout layout,
@@ -154,6 +154,8 @@ static void container_move_to_container_from_direction(
static void container_move_to_workspace_from_direction(
struct sway_container *container, struct sway_workspace *workspace,
enum wlr_direction move_dir) {
+ container->width = container->height = 0;
+
if (is_parallel(workspace->layout, move_dir)) {
wlr_log(WLR_DEBUG, "Reparenting container (parallel)");
int index =
@@ -216,6 +218,7 @@ static void container_move_to_container(struct sway_container *container,
return;
}
if (container_is_floating(container)) {
+ container_move_to_workspace(container, destination->workspace);
return;
}
struct sway_workspace *old_workspace = container->workspace;