X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fframe.c;h=81a50fe258322ba769f9df7365e6239c60e679c8;hb=4c7119f94fe6accb43770aba1a220bed7c627b79;hp=1fbf2152fc6cd23d8a575186242e74814b26ba1f;hpb=7472ed3557353e4a779da2a9b6b01532f7374022;p=chaz%2Fopenbox diff --git a/openbox/frame.c b/openbox/frame.c index 1fbf2152..81a50fe2 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -295,18 +295,20 @@ void frame_adjust_shape(ObFrame *self) num = 0; if (self->decorations & OB_FRAME_DECOR_TITLEBAR) { - xrect[0].x = -ob_rr_theme->fbwidth; - xrect[0].y = -ob_rr_theme->fbwidth; - xrect[0].width = self->width + self->bwidth * 2; + xrect[0].x = 0; + xrect[0].y = 0; + xrect[0].width = self->area.width; xrect[0].height = ob_rr_theme->title_height + - self->bwidth * 2; + self->bwidth + self->rbwidth; ++num; } - if (self->decorations & OB_FRAME_DECOR_HANDLE) { - xrect[1].x = -ob_rr_theme->fbwidth; + if (self->decorations & OB_FRAME_DECOR_HANDLE && + ob_rr_theme->handle_height > 0) + { + xrect[1].x = 0; xrect[1].y = FRAME_HANDLE_Y(self); - xrect[1].width = self->width + self->bwidth * 2; + xrect[1].width = self->area.width; xrect[1].height = ob_rr_theme->handle_height + self->bwidth * 2; ++num; @@ -413,12 +415,14 @@ void frame_adjust_area(ObFrame *self, gboolean moved, ob_rr_theme->title_height + self->bwidth, self->client->area.width + self->cbwidth_x * 2, - self->bwidth); + self->rbwidth); XMapWindow(ob_display, self->titlebottom); } else XUnmapWindow(ob_display, self->titlebottom); } else { + XUnmapWindow(ob_display, self->titlebottom); + XUnmapWindow(ob_display, self->titletop); XUnmapWindow(ob_display, self->titletopleft); XUnmapWindow(ob_display, self->titletopright); @@ -576,9 +580,22 @@ void frame_adjust_area(ObFrame *self, gboolean moved, XUnmapWindow(ob_display, self->lgriptop); XUnmapWindow(ob_display, self->rgriptop); } - } else + } else { + XUnmapWindow(ob_display, self->handleleft); + XUnmapWindow(ob_display, self->handleright); + XUnmapWindow(ob_display, self->lgriptop); + XUnmapWindow(ob_display, self->rgriptop); + XUnmapWindow(ob_display, self->handletop); + } } else { + XUnmapWindow(ob_display, self->handleleft); + XUnmapWindow(ob_display, self->handleright); + XUnmapWindow(ob_display, self->lgriptop); + XUnmapWindow(ob_display, self->rgriptop); + + XUnmapWindow(ob_display, self->handletop); + XUnmapWindow(ob_display, self->handlebottom); XUnmapWindow(ob_display, self->lgripleft); XUnmapWindow(ob_display, self->rgripright);