]> git.sur5r.net Git - i3/i3/blobdiff - src/render.c
re-add fullscreen mode
[i3/i3] / src / render.c
index b2932f50f8c5eb76b01d70a20cd622cd76f44ba7..c0dbdd5f07c35b76b4f9d3e7dd3739d0ff4c8d59 100644 (file)
@@ -37,6 +37,18 @@ void render_con(Con *con) {
     printf("mapped = true\n");
     con->mapped = true;
 
+    /* if this container contains a window, set the coordinates */
+    if (con->window) {
+        /* depending on the border style, the rect of the child window
+         * needs to be smaller */
+        Rect *inset = &(con->window_rect);
+        *inset = (Rect){0, 0, con->rect.width, con->rect.height};
+        /* TODO: different border styles */
+        inset->x += 2;
+        inset->width -= 2 * 2;
+        inset->height -= 2;
+    }
+
     /* Check for fullscreen nodes */
     Con *fullscreen = con_get_fullscreen_con(con);
     if (fullscreen) {
@@ -46,7 +58,6 @@ void render_con(Con *con) {
         return;
     }
 
-
     TAILQ_FOREACH(child, &(con->nodes_head), nodes) {
 
         /* default layout */
@@ -105,16 +116,6 @@ void render_con(Con *con) {
         printf("child at (%d, %d) with (%d x %d)\n",
                 child->rect.x, child->rect.y, child->rect.width, child->rect.height);
         printf("x now %d, y now %d\n", x, y);
-        if (child->window) {
-            /* depending on the border style, the rect of the child window
-             * needs to be smaller */
-            Rect *inset = &(child->window_rect);
-            *inset = (Rect){0, 0, child->rect.width, child->rect.height};
-            /* TODO: different border styles */
-            inset->x += 2;
-            inset->width -= 2 * 2;
-            inset->height -= 2;
-        }
         x_raise_con(child);
         render_con(child);
         i++;