From b08f7e5183d25ce0d4ae89796893a6d25d4a1b93 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 6 Apr 2018 09:26:28 -0400 Subject: Fix deletion of still-visible workspaces on unfocus --- sway/input/seat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sway/input') diff --git a/sway/input/seat.c b/sway/input/seat.c index e3df6955..ad3584a0 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -6,6 +6,7 @@ #include #include #include "sway/tree/container.h" +#include "sway/tree/workspace.h" #include "sway/input/seat.h" #include "sway/input/cursor.h" #include "sway/input/input-manager.h" @@ -398,7 +399,8 @@ void seat_set_focus_warp(struct sway_seat *seat, } if (last_ws) { ipc_event_workspace(last_ws, container, "focus"); - if (last_ws->children->length == 0) { + if (!workspace_is_visible(last_ws) + && last_ws->children->length == 0) { container_destroy(last_ws); } } -- cgit v1.2.3