X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fframerender.c;h=4f5d08581a9fd8a9ef2f2dc0b1b9a7a110504de9;hb=9cb80fc994c09ee62f99f46244b840ce25fd40f4;hp=78c1d02feb85a55c3d5d625f6f5c86058d814a7d;hpb=b26635fe994a7cd1dc28893c0e40517b61036a9f;p=chaz%2Fopenbox diff --git a/openbox/framerender.c b/openbox/framerender.c index 78c1d02f..4f5d0858 100644 --- a/openbox/framerender.c +++ b/openbox/framerender.c @@ -46,17 +46,51 @@ void framerender_frame(ObFrame *self) px = (self->focused ? RrColorPixel(ob_rr_theme->frame_focused_border_color) : RrColorPixel(ob_rr_theme->frame_unfocused_border_color)); - XSetWindowBorder(ob_display, self->window, px); - XSetWindowBorder(ob_display, self->title, px); - XSetWindowBorder(ob_display, self->handle, px); - XSetWindowBorder(ob_display, self->rgrip, px); - XSetWindowBorder(ob_display, self->lgrip, px); - XSetWindowBorder(ob_display, self->leftresize, px); - XSetWindowBorder(ob_display, self->rightresize, px); + + XSetWindowBackground(ob_display, self->left, px); + XClearWindow(ob_display, self->left); + XSetWindowBackground(ob_display, self->right, px); + XClearWindow(ob_display, self->right); + + 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); + + XSetWindowBackground(ob_display, self->handleleft, px); + XClearWindow(ob_display, self->handleleft); + XSetWindowBackground(ob_display, self->handletop, px); + XClearWindow(ob_display, self->handletop); + XSetWindowBackground(ob_display, self->handleright, px); + XClearWindow(ob_display, self->handleright); + XSetWindowBackground(ob_display, self->handlebottom, px); + XClearWindow(ob_display, self->handlebottom); + + XSetWindowBackground(ob_display, self->lgripleft, px); + XClearWindow(ob_display, self->lgripleft); + XSetWindowBackground(ob_display, self->lgriptop, px); + XClearWindow(ob_display, self->lgriptop); + XSetWindowBackground(ob_display, self->lgripbottom, px); + XClearWindow(ob_display, self->lgripbottom); + + XSetWindowBackground(ob_display, self->rgripright, px); + XClearWindow(ob_display, self->rgripright); + XSetWindowBackground(ob_display, self->rgriptop, px); + XClearWindow(ob_display, self->rgriptop); + XSetWindowBackground(ob_display, self->rgripbottom, px); + XClearWindow(ob_display, self->rgripbottom); } if (self->decorations & OB_FRAME_DECOR_TITLEBAR) { - RrAppearance *t, *l, *m, *n, *i, *d, *s, *c; + RrAppearance *t, *l, *m, *n, *i, *d, *s, *c, *clear; if (self->focused) { t = self->a_focused_title; @@ -174,39 +208,38 @@ void framerender_frame(ObFrame *self) ob_rr_theme->a_hover_unfocused_close : ob_rr_theme->a_unfocused_unpressed_close))); } + clear = ob_rr_theme->a_clear; 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.parenty = 0; + clear->surface.parent = t; + clear->surface.parenty = 0; + + clear->surface.parentx = ob_rr_theme->grip_width; - 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, + RrPaint(clear, self->topresize, + self->width - ob_rr_theme->grip_width * 2, ob_rr_theme->paddingy + 1); - ob_rr_theme->a_clear->surface.parentx = 0; + clear->surface.parentx = 0; if (ob_rr_theme->grip_width > 0) - RrPaint(ob_rr_theme->a_clear, self->tltresize, + RrPaint(clear, self->tltresize, ob_rr_theme->grip_width, ob_rr_theme->paddingy + 1); if (ob_rr_theme->title_height > 0) - RrPaint(ob_rr_theme->a_clear, self->tllresize, + RrPaint(clear, self->tllresize, ob_rr_theme->paddingx + 1, ob_rr_theme->title_height); - ob_rr_theme->a_clear->surface.parentx = - self->width - ob_rr_theme->grip_width; + clear->surface.parentx = self->width - ob_rr_theme->grip_width; if (ob_rr_theme->grip_width > 0) - RrPaint(ob_rr_theme->a_clear, self->trtresize, + RrPaint(clear, self->trtresize, ob_rr_theme->grip_width, ob_rr_theme->paddingy + 1); - ob_rr_theme->a_clear->surface.parentx = - self->width - (ob_rr_theme->paddingx + 1); + clear->surface.parentx = self->width - (ob_rr_theme->paddingx + 1); if (ob_rr_theme->title_height > 0) - RrPaint(ob_rr_theme->a_clear, self->trrresize, + RrPaint(clear, self->trrresize, ob_rr_theme->paddingx + 1, ob_rr_theme->title_height); /* set parents for any parent relative guys */