]> git.sur5r.net Git - i3/i3/blobdiff - src/render.c
implement configure requests, adapt testcase
[i3/i3] / src / render.c
index 469ceaa891ea75b8ef3d8d1b268094ebea5799bf..523b9188ac26ed08681baeb295e01db451ab70d3 100644 (file)
@@ -51,12 +51,8 @@ void render_con(Con *con) {
         /* depending on the border style, the rect of the child window
          * needs to be smaller */
         Rect *inset = &(con->window_rect);
-
-        if (con->border_style == BS_NORMAL)
-            *inset = (Rect){2, 0, con->rect.width - (2 * 2), con->rect.height - 2};
-        else if (con->border_style == BS_1PIXEL)
-            *inset = (Rect){1, 1, con->rect.width - 2, con->rect.height - 1};
-        else *inset = (Rect){0, 0, con->rect.width, con->rect.height};
+        *inset = (Rect){0, 0, con->rect.width, con->rect.height};
+        *inset = rect_add(*inset, con_border_style_rect(con));
 
         /* Obey the aspect ratio, if any */
         if (con->proportional_height != 0 &&