diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2018-10-20 08:49:51 +1000 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2018-10-20 08:49:51 +1000 |
| commit | dd779b095e226ed0f00b5ba524861b19e93bc372 (patch) | |
| tree | 8b4b106bf2eeeb7bc58c8e7aa3165f8ce66bdfac | |
| parent | 3382f4c28407d07dc0e9b7bbdd63697cec69f2c1 (diff) | |
Fix crash when ending tiling drag
If the container being dragged has a parent that needs to be reaped, it
must be reaped after we've reinserted the dragging container into the
tree. During reaping, handle_seat_node_destroy tries to refocus the
dragging container which isn't possible while it's detached.
| -rw-r--r-- | sway/input/seat.c | 7 |
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. |
