aboutsummaryrefslogtreecommitdiff
path: root/sway/input/seat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 7cf0dd08..ae536264 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -8,6 +8,7 @@
#include "sway/input/keyboard.h"
#include "sway/ipc-server.h"
#include "sway/output.h"
+#include "sway/tree/container.h"
#include "sway/tree/view.h"
#include "log.h"
@@ -331,6 +332,9 @@ void sway_seat_set_focus(struct sway_seat *seat, struct sway_container *containe
if (last_ws) {
wlr_log(L_DEBUG, "sending workspace event");
ipc_event_workspace(last_ws, container, "focus");
+ if (last_ws->children->length == 0) {
+ container_workspace_destroy(last_ws);
+ }
}
}