23 Con *child, *dockchild;
33 if (child->
type == CT_CON) {
34 if (content != NULL) {
35 DLOG(
"More than one CT_CON on output container\n");
39 }
else if (child->
type != CT_DOCKAREA) {
40 DLOG(
"Child %p of type %d is inside the OUTPUT con\n", child, child->
type);
45 assert(content != NULL);
62 if (child->
type != CT_DOCKAREA)
74 if (child->
type == CT_CON) {
92 DLOG(
"child at (%d, %d) with (%d x %d)\n",
109 DLOG(
"Rendering %snode %p / %s / layout %d / children %d / orient %d\n",
110 (render_fullscreen ?
"fullscreen " :
""), con, con->
name, con->
layout,
139 if (!render_fullscreen)
155 if (!render_fullscreen &&
158 double new_height = inset->
height + 1;
159 int new_width = inset->
width;
161 while (new_height > inset->
height) {
164 if (new_height > inset->
height)
168 inset->
y += ceil(inset->
height / 2) - floor(new_height / 2);
169 inset->
x += ceil(inset->
width / 2) - floor(new_width / 2);
171 inset->
height = new_height;
172 inset->
width = new_width;
176 int old_height = inset->
height;
178 DLOG(
"Lost %d pixel due to client's height_increment (%d px, base_height = %d)\n",
183 int old_width = inset->
width;
185 DLOG(
"Lost %d pixel due to client's width_increment (%d px, base_width = %d)\n",
189 DLOG(
"child will be at %dx%d with size %dx%d\n", inset->
x, inset->
y, inset->
width, inset->
height);
193 Con *fullscreen = NULL;
194 if (con->
type != CT_OUTPUT) {
198 fullscreen->
rect = rect;
211 if (con->
layout == L_DEFAULT && children > 0) {
214 int i = 0, assigned = 0;
217 double percentage = child->
percent > 0.0 ? child->
percent : 1.0 / children;
218 assigned += sizes[i++] = percentage * total;
220 assert(assigned == total ||
221 (assigned > total && assigned - total <= children * 2) ||
222 (assigned < total && total - assigned <= children * 2));
223 int signal = assigned < total ? 1 : -1;
224 while (assigned != total) {
225 for (i = 0; i < children && assigned != total; ++i) {
232 if (con->
layout == L_OUTPUT) {
234 if (con->
name[0] ==
'_' && con->
name[1] ==
'_')
237 }
else if (con->
type == CT_ROOT) {
247 DLOG(
"Rendering floating windows:\n");
249 if (output->
name[0] ==
'_' && output->
name[1] ==
'_')
258 Con *fullscreen = NULL;
277 TAILQ_FOREACH(child, &(workspace->floating_head), floating_windows) {
289 assert(children > 0);
292 if (con->
layout == L_DEFAULT) {
313 child->
rect.
y += deco_height;
322 else if (con->
layout == L_STACKED) {
334 child->
rect.
y += (deco_height * children);
335 child->
rect.
height -= (deco_height * children);
340 else if (con->
layout == L_TABBED) {
352 child->
rect.
y += deco_height;
358 else if (con->
layout == L_DOCKAREA) {
371 DLOG(
"child at (%d, %d) with (%d x %d)\n",
379 if (con->
layout == L_STACKED || con->
layout == L_TABBED) {