- DLOG("Got %d workspaces\n", num_workspaces);
- uint8_t *workarea = smalloc(sizeof(Rect) * num_workspaces);
- TAILQ_FOREACH(ws, workspaces, workspaces) {
- DLOG("storing %d: %dx%d with %d x %d\n", count, ws->rect.x,
- ws->rect.y, ws->rect.width, ws->rect.height);
- /* If a workspace is not yet initialized and thus its
- * dimensions are zero, we will instead put the dimensions
- * of the last workspace in the list. For example firefox
- * intersects all workspaces and does not cope so well with
- * an all-zero workspace. */
- if (ws->rect.width == 0 || ws->rect.height == 0) {
- DLOG("re-using last_rect (%dx%d, %d, %d)\n",
- last_rect.x, last_rect.y, last_rect.width,
- last_rect.height);
- memcpy(workarea + (sizeof(Rect) * count++), &last_rect, sizeof(Rect));
- continue;
- }
- memcpy(workarea + (sizeof(Rect) * count++), &(ws->rect), sizeof(Rect));
- memcpy(&last_rect, &(ws->rect), sizeof(Rect));
+ DLOG("Got %d workspaces\n", num_workspaces);
+ uint8_t *workarea = smalloc(sizeof(Rect) * num_workspaces);
+ TAILQ_FOREACH(output, &(croot->nodes_head), nodes) {
+ Con *ws;
+ TAILQ_FOREACH(ws, &(output_get_content(output)->nodes_head), nodes) {
+ DLOG("storing %d: %dx%d with %d x %d\n", count, ws->rect.x,
+ ws->rect.y, ws->rect.width, ws->rect.height);
+ /* If a workspace is not yet initialized and thus its
+ * dimensions are zero, we will instead put the dimensions
+ * of the last workspace in the list. For example firefox
+ * intersects all workspaces and does not cope so well with
+ * an all-zero workspace. */
+ if (ws->rect.width == 0 || ws->rect.height == 0) {
+ DLOG("re-using last_rect (%dx%d, %d, %d)\n",
+ last_rect.x, last_rect.y, last_rect.width,
+ last_rect.height);
+ memcpy(workarea + (sizeof(Rect) * count++), &last_rect, sizeof(Rect));
+ continue;
+ }
+ memcpy(workarea + (sizeof(Rect) * count++), &(ws->rect), sizeof(Rect));
+ memcpy(&last_rect, &(ws->rect), sizeof(Rect));