Client *fullscreen_client;
- /* Contains all clients with _NET_WM_WINDOW_TYPE == _NET_WM_WINDOW_TYPE_DOCK */
- SLIST_HEAD(dock_clients_head, Client) dock_clients;
-
/* The focus stack contains the clients in the correct order of focus so that
the focus can be reverted correctly when a client is closed */
SLIST_HEAD(focus_stack_head, Client) focus_stack;
xcb_window_t bar;
xcb_gcontext_t bargc;
+ /* Contains all clients with _NET_WM_WINDOW_TYPE == _NET_WM_WINDOW_TYPE_DOCK */
+ SLIST_HEAD(dock_clients_head, Client) dock_clients;
+
TAILQ_ENTRY(Screen) screens;
};
if (client->dock) {
LOG("Removing from dock clients\n");
- SLIST_REMOVE(&(client->workspace->dock_clients), client, Client, dock_clients);
+ SLIST_REMOVE(&(client->workspace->screen->dock_clients), client, Client, dock_clients);
}
LOG("child of 0x%08x.\n", client->frame);
static void render_bars(xcb_connection_t *conn, Workspace *r_ws, int width, int *height) {
Client *client;
- SLIST_FOREACH(client, &(r_ws->dock_clients), dock_clients) {
+ SLIST_FOREACH(client, &(r_ws->screen->dock_clients), dock_clients) {
LOG("client is at %d, should be at %d\n", client->rect.y, *height);
if (client->force_reconfigure |
update_if_necessary(&(client->rect.x), 0) |
/* Reserve space for dock clients */
Client *client;
- SLIST_FOREACH(client, &(r_ws->dock_clients), dock_clients)
+ SLIST_FOREACH(client, &(screen->dock_clients), dock_clients)
height -= client->desired_height;
/* Space for the internal bar */
new->titlebar_position = TITLEBAR_OFF;
new->force_reconfigure = true;
new->container = NULL;
- SLIST_INSERT_HEAD(&(c_ws->dock_clients), new, dock_clients);
+ SLIST_INSERT_HEAD(&(c_ws->screen->dock_clients), new, dock_clients);
}
}
for (int i = 0; i < 10; i++) {
workspaces[i].screen = NULL;
workspaces[i].num = i;
- SLIST_INIT(&(workspaces[i].dock_clients));
expand_table_cols(&(workspaces[i]));
expand_table_rows(&(workspaces[i]));
}
screen->bargc = xcb_generate_id(conn);
xcb_create_gc(conn, screen->bargc, screen->bar, 0, 0);
+ SLIST_INIT(&(screen->dock_clients));
+
/* Copy dimensions */
memcpy(&(workspace->rect), &(screen->rect), sizeof(Rect));
LOG("that is virtual screen at %d x %d with %d x %d\n",
screen->bar = workspaces[c].screen->bar;
screen->bargc = workspaces[c].screen->bargc;
+ /* Copy the list head for the dock clients */
+ screen->dock_clients = workspaces[c].screen->dock_clients;
+
/* Update the dimensions */
memcpy(&(workspaces[c].rect), &(screen->rect), sizeof(Rect));
workspaces[c].screen = screen;