aboutsummaryrefslogtreecommitdiff
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-04-13 09:19:04 -0400
committerGitHub <noreply@github.com>2018-04-13 09:19:04 -0400
commit3dd185ec04bd3e4e1e34799adc4d7c28e4ab880c (patch)
treeb27acb8f604bf5fc5cc39b927d3e62d748cf7313 /sway/input/seat.c
parenta5735c08c7c3d99c452ea87a591afef0f4c2f5d2 (diff)
parent2b34bf1882f24ebd8c87debb2e2223bc084736c3 (diff)
Merge pull request #1804 from martinetd/crashes
Fix crashes
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 467e5087..431460c4 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -491,6 +491,9 @@ void seat_set_focus_warp(struct sway_seat *seat,
ipc_event_workspace(last_ws, container, "focus");
if (!workspace_is_visible(last_ws)
&& last_ws->children->length == 0) {
+ if (last_ws == last_focus) {
+ last_focus = NULL;
+ }
container_destroy(last_ws);
}
}