Con *con_get_fullscreen_con(Con *con) {
Con *current, *child;
- LOG("looking for fullscreen node\n");
/* TODO: is breadth-first-search really appropriate? (check as soon as
* fullscreen levels and fullscreen for containers is implemented) */
TAILQ_HEAD(bfs_head, bfs_entry) bfs_head = TAILQ_HEAD_INITIALIZER(bfs_head);
while (!TAILQ_EMPTY(&bfs_head)) {
entry = TAILQ_FIRST(&bfs_head);
current = entry->con;
- LOG("checking %p\n", current);
if (current != con && current->fullscreen_mode != CF_NONE) {
/* empty the queue */
while (!TAILQ_EMPTY(&bfs_head)) {
return current;
}
- LOG("deleting from queue\n");
TAILQ_REMOVE(&bfs_head, entry, entries);
free(entry);
int i = 0;
- printf("mapped = true\n");
con->mapped = true;
/* if this container contains a window, set the coordinates */
static void mark_unmapped(Con *con) {
Con *current;
- DLOG("marking container %p unmapped\n", con);
con->mapped = false;
TAILQ_FOREACH(current, &(con->nodes_head), nodes)
mark_unmapped(current);
if (con->type == CT_WORKSPACE) {
TAILQ_FOREACH(current, &(con->floating_head), floating_windows) {
- DLOG("Marking unmapped for floating %p\n", current);
current->mapped = false;
Con *child = TAILQ_FIRST(&(current->nodes_head));
- DLOG(" unmapping floating child %p\n", child);
child->mapped = false;
}
}
- DLOG("mark_unmapped done\n");
}
/*
* this frame. */
uint32_t max_y = 0, max_height = 0;
TAILQ_FOREACH(current, &(con->nodes_head), nodes) {
- DLOG("Child's decoration is %d x %d, from (%d, %d)\n",
- current->deco_rect.width, current->deco_rect.height,
- current->deco_rect.x, current->deco_rect.y);
Rect *dr = &(current->deco_rect);
if (dr->y >= max_y && dr->height >= max_height) {
max_y = dr->y;
max_height = dr->height;
}
}
- DLOG("bottom of decorations is %d\n", max_y + max_height);
rect.height = max_y + max_height;
if (rect.height == 0) {
DLOG("Unmapping container because it does not contain anything atm.\n");
LOG("raising in new stack: %p / %s\n", con, con->name);
state = state_for_frame(con->frame);
- LOG("found state entry, moving to top\n");
CIRCLEQ_REMOVE(&state_head, state, state);
CIRCLEQ_INSERT_HEAD(&state_head, state, state);
}