aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-08-12 02:28:49 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-08-13 10:16:32 +0900
commit3e33e1c76ff58154768a7789c946bd142f9f3dc2 (patch)
tree177183678ad251ed040ebaf677c02416e85adc1f /sway/input/seat.c
parentworkspace: prefer identifiers for output priority (diff)
downloadsway-3e33e1c76ff58154768a7789c946bd142f9f3dc2.tar.gz
sway-3e33e1c76ff58154768a7789c946bd142f9f3dc2.tar.zst
sway-3e33e1c76ff58154768a7789c946bd142f9f3dc2.zip
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
Diffstat (limited to 'sway/input/seat.c')
-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) {
153 struct sway_node *focus = seat_get_focus(seat); 153 struct sway_node *focus = seat_get_focus(seat);
154 154
155 if (node->type == N_WORKSPACE) { 155 if (node->type == N_WORKSPACE) {
156 seat_node_destroy(seat_node);
156 // If an unmanaged or layer surface is focused when an output gets 157 // If an unmanaged or layer surface is focused when an output gets
157 // disabled and an empty workspace on the output was focused by the 158 // disabled and an empty workspace on the output was focused by the
158 // seat, the seat needs to refocus it's focus inactive to update the 159 // 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) {
166 seat->workspace = NULL; 167 seat->workspace = NULL;
167 } 168 }
168 } 169 }
169 seat_node_destroy(seat_node);
170 return; 170 return;
171 } 171 }
172 172