aboutsummaryrefslogtreecommitdiff
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-10-20 01:18:23 +0200
committerGitHub <noreply@github.com>2018-10-20 01:18:23 +0200
commit3b8dd4958311f40701e352bf49b62ae850cdd2f9 (patch)
tree2a47f763e69105908b5421297b4430af9eb176ee /sway/input/seat.c
parentbb6c9f52c789a7058dbff6a3abb80f8ff5d778ba (diff)
parent9b828939e5147300bef99820180b7c8de3ba260d (diff)
Merge pull request #2885 from RyanDwyer/fix-tiling-drag-crash
Fix crash when ending tiling drag
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index cffceaae..659ec89b 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -1110,9 +1110,6 @@ static void seat_end_move_tiling(struct sway_seat *seat) {
int after = edge != WLR_EDGE_TOP && edge != WLR_EDGE_LEFT;
container_detach(con);
- if (old_parent) {
- container_reap_empty(old_parent);
- }
// Moving container into empty workspace
if (target_node->type == N_WORKSPACE && edge == WLR_EDGE_NONE) {
@@ -1135,6 +1132,10 @@ static void seat_end_move_tiling(struct sway_seat *seat) {
workspace_insert_tiling(new_ws, con, after);
}
+ if (old_parent) {
+ container_reap_empty(old_parent);
+ }
+
// This is a bit dirty, but we'll set the dimensions to that of a sibling.
// I don't think there's any other way to make it consistent without
// changing how we auto-size containers.