From 5438d6631f0fd93f07f0d4f44e8639c10558eb04 Mon Sep 17 00:00:00 2001 From: Marko Date: Sat, 10 Jun 2023 03:10:05 +0200 Subject: [PATCH] Make sure to send the `empty` event --- sway/tree/workspace.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c index b32f15aa..921e8f6b 100644 --- a/sway/tree/workspace.c +++ b/sway/tree/workspace.c @@ -155,10 +155,6 @@ void workspace_begin_destroy(struct sway_workspace *workspace) { } void workspace_consider_destroy(struct sway_workspace *ws) { - if (ws->persistent) { - return; - } - if (ws->tiling->length || ws->floating->length) { return; } @@ -175,6 +171,11 @@ void workspace_consider_destroy(struct sway_workspace *ws) { } } + if (ws->persistent) { + ipc_event_workspace(NULL, ws, "empty"); + return; + } + workspace_begin_destroy(ws); }