From: Mikael Magnusson Date: Thu, 24 May 2007 21:39:23 +0000 (+0000) Subject: merge r6815 from 3.4-working (!) 'fix positioning of tlt, top and trt resize elements... X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=37aaf4c1e44c205ccbe9ddb7f7633afdcf57fa0f;p=chaz%2Fopenbox merge r6815 from 3.4-working (!) 'fix positioning of tlt, top and trt resize elements. thanks mulberry' --- diff --git a/openbox/frame.c b/openbox/frame.c index 16910265..37e39e2e 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -446,19 +446,17 @@ void frame_adjust_area(ObFrame *self, gboolean moved, if (self->decorations & OB_FRAME_DECOR_GRIPS) { XMoveResizeWindow(ob_display, self->topresize, - ob_rr_theme->grip_width + self->bwidth, + ob_rr_theme->grip_width, 0, self->width - ob_rr_theme->grip_width *2, ob_rr_theme->paddingy + 1); - XMoveWindow(ob_display, self->tltresize, self->bwidth, 0); - XMoveWindow(ob_display, self->tllresize, self->bwidth, 0); + XMoveWindow(ob_display, self->tltresize, 0, 0); + XMoveWindow(ob_display, self->tllresize, 0, 0); XMoveWindow(ob_display, self->trtresize, - self->bwidth + self->width - - ob_rr_theme->grip_width, 0); + self->width - ob_rr_theme->grip_width, 0); XMoveWindow(ob_display, self->trrresize, - self->bwidth + self->width - - ob_rr_theme->paddingx - 1, 0); + self->width - ob_rr_theme->paddingx - 1, 0); XMapWindow(ob_display, self->topresize); XMapWindow(ob_display, self->tltresize); diff --git a/openbox/framerender.c b/openbox/framerender.c index d841267e..4f5d0858 100644 --- a/openbox/framerender.c +++ b/openbox/framerender.c @@ -90,7 +90,7 @@ void framerender_frame(ObFrame *self) } 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; @@ -208,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; - ob_rr_theme->a_clear->surface.parentx = ob_rr_theme->grip_width + - self->bwidth; - RrPaint(ob_rr_theme->a_clear, self->topresize, + clear->surface.parentx = ob_rr_theme->grip_width; + + 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 */