summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2019-08-12 02:28:49 -0400
committerFurkan Sahin <furkan-dev@proton.me>2019-08-12 02:28:49 -0400
commit7c8160fcfd8cd490d466c6ac73f0297ee6b11f39 (patch)
treeea76dd32098a09b84dab9ed7662452f8f1582559
parent2cdb2e6b68d18fb9a834fa9961ae264ebf2bccfb (diff)
handle_seat_node_destroy: do not focus own node
In handle_seat_node_destroy, it was possible to focus the node attached to the seat node that is being destroyed when an empty workspace was being destroyed in a multiple seat environment. This resulted in infinite recursion when attempting to destroy the workspace. This just moves the seat node destruction higher so it cannot be the focus inactive for the seat. This is the same ordering that is applied to destruction of seat nodes for containers
-rw-r--r--sway/input/seat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 12309c1d..f28c1cb9 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -153,6 +153,7 @@ static void handle_seat_node_destroy(struct wl_listener *listener, void *data) {
struct sway_node *focus = seat_get_focus(seat);
if (node->type == N_WORKSPACE) {
+ seat_node_destroy(seat_node);
// If an unmanaged or layer surface is focused when an output gets
// disabled and an empty workspace on the output was focused by the
// seat, the seat needs to refocus it's focus inactive to update the
@@ -166,7 +167,6 @@ static void handle_seat_node_destroy(struct wl_listener *listener, void *data) {
seat->workspace = NULL;
}
}
- seat_node_destroy(seat_node);
return;
}