]> Dogcows Code - chaz/openbox/blobdiff - openbox/framerender.c
construct the titlebar without borders
[chaz/openbox] / openbox / framerender.c
index 214743807d7aae1a023a8308cb50e9e51ea02595..e4f945a0eb60a17ba5cf12c9220e0a1605575799 100644 (file)
@@ -42,6 +42,31 @@ void framerender_frame(ObFrame *self)
               RrColorPixel(ob_rr_theme->cb_unfocused_color));
         XSetWindowBackground(ob_display, self->inner, px);
         XClearWindow(ob_display, self->inner);
+
+        px = (self->focused ?
+              RrColorPixel(ob_rr_theme->frame_focused_border_color) :
+              RrColorPixel(ob_rr_theme->frame_unfocused_border_color));
+        XSetWindowBorder(ob_display, self->handle, px);
+        XSetWindowBorder(ob_display, self->rgrip, px);
+        XSetWindowBorder(ob_display, self->lgrip, px);
+
+        XSetWindowBackground(ob_display, self->leftresize, px);
+        XClearWindow(ob_display, self->leftresize);
+        XSetWindowBackground(ob_display, self->rightresize, px);
+        XClearWindow(ob_display, self->rightresize);
+
+        XSetWindowBackground(ob_display, self->titleleft, px);
+        XClearWindow(ob_display, self->titleleft);
+        XSetWindowBackground(ob_display, self->titletop, px);
+        XClearWindow(ob_display, self->titletop);
+        XSetWindowBackground(ob_display, self->titletopleft, px);
+        XClearWindow(ob_display, self->titletopleft);
+        XSetWindowBackground(ob_display, self->titletopright, px);
+        XClearWindow(ob_display, self->titletopright);
+        XSetWindowBackground(ob_display, self->titleright, px);
+        XClearWindow(ob_display, self->titleright);
+        XSetWindowBackground(ob_display, self->titlebottom, px);
+        XClearWindow(ob_display, self->titlebottom);
     }
 
     if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
@@ -167,9 +192,16 @@ void framerender_frame(ObFrame *self)
         RrPaint(t, self->title, self->width, ob_rr_theme->title_height);
 
         ob_rr_theme->a_clear->surface.parent = t;
-        ob_rr_theme->a_clear->surface.parentx = 0;
         ob_rr_theme->a_clear->surface.parenty = 0;
 
+        ob_rr_theme->a_clear->surface.parentx = ob_rr_theme->grip_width +
+            self->bwidth;
+        RrPaint(ob_rr_theme->a_clear, self->topresize,
+                self->width - (ob_rr_theme->grip_width + self->bwidth) * 2,
+                ob_rr_theme->paddingy + 1);
+
+        ob_rr_theme->a_clear->surface.parentx = 0;
+
         if (ob_rr_theme->grip_width > 0)
             RrPaint(ob_rr_theme->a_clear, self->tltresize,
                     ob_rr_theme->grip_width, ob_rr_theme->paddingy + 1);
This page took 0.021607 seconds and 4 git commands to generate.