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); }