break;
}
- if (workspace_empty && (c_ws != client->workspace))
+ i3Screen *screen;
+ TAILQ_FOREACH(screen, virtual_screens, screens)
+ if (screen->current_workspace == client->workspace->num) {
+ workspace_empty = false;
+ break;
+ }
+
+ if (workspace_empty)
client->workspace->screen = NULL;
free(client);
/* …or one of the bars? */
i3Screen *screen;
- TAILQ_FOREACH(screen, virtual_screens, screens) {
- if (screen->bar == event->window) {
+ TAILQ_FOREACH(screen, virtual_screens, screens)
+ if (screen->bar == event->window)
render_layout(conn);
- }
- }
return 1;
}