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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c
index 7b503624..59f1cf78 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -117,7 +117,8 @@ static void container_move_to_container_from_direction(
struct sway_container *container, struct sway_container *destination,
enum movement_direction move_dir) {
if (destination->view) {
- if (destination->parent == container->parent) {
+ if (destination->parent == container->parent &&
+ destination->workspace == container->workspace) {
wlr_log(WLR_DEBUG, "Swapping siblings");
list_t *siblings = container_get_siblings(container);
int container_index = list_find(siblings, container);