Bugfix: Delete empty workspaces even when they’re not the active workspace
This fixes ticket #23
This commit is contained in:
parent
4bd7667445
commit
72d82f3993
|
@ -635,6 +635,17 @@ int handle_unmap_notify_event(void *data, xcb_connection_t *conn, xcb_unmap_noti
|
|||
if (client->container != NULL)
|
||||
cleanup_table(conn, client->container->workspace);
|
||||
|
||||
/* Let’s see how many clients there are left on the workspace to delete it if it’s empty */
|
||||
bool workspace_empty = true;
|
||||
FOR_TABLE(client->workspace)
|
||||
if (!CIRCLEQ_EMPTY(&(client->workspace->table[cols][rows]->clients))) {
|
||||
workspace_empty = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (workspace_empty)
|
||||
client->workspace->screen = NULL;
|
||||
|
||||
free(client);
|
||||
|
||||
render_layout(conn);
|
||||
|
|
Loading…
Reference in New Issue