X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fframe.c;h=5c3922b1547fde4e82d7f7865125ebde01c5f2f9;hb=8159ac5f8634ccaf7cd34e12ea1efa457e4bdcac;hp=df5e60169d95af9acd27d52e9d90d2e7365fa377;hpb=813d5c2ec963b3a108b2cbe8efcb9572934d8f59;p=chaz%2Fopenbox diff --git a/openbox/frame.c b/openbox/frame.c index df5e6016..5c3922b1 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -72,6 +72,11 @@ static Visual *check_32bit_client(ObClient *c) XWindowAttributes wattrib; Status ret; + /* we're already running at 32 bit depth, yay. we don't need to use their + visual */ + if (RrDepth(ob_rr_inst) == 32) + return NULL; + ret = XGetWindowAttributes(ob_display, c->window, &wattrib); g_assert(ret != BadDrawable); g_assert(ret != BadWindow); @@ -398,35 +403,17 @@ void frame_adjust_area(ObFrame *self, gboolean moved, XMoveWindow(ob_display, self->trrresize, self->width - ob_rr_theme->paddingx - 1, 0); - XMoveResizeWindow(ob_display, self->leftresize, - -(ob_rr_theme->fbwidth * 2) - 1, - 0, - 1, - self->client->area.height + - self->cbwidth_y * 2); - XMoveResizeWindow(ob_display, self->rightresize, - self->client->area.width + - self->cbwidth_x * 2, - 0, - 1, - self->client->area.height + - self->cbwidth_y * 2); - XMapWindow(ob_display, self->topresize); XMapWindow(ob_display, self->tltresize); XMapWindow(ob_display, self->tllresize); XMapWindow(ob_display, self->trtresize); XMapWindow(ob_display, self->trrresize); - XMapWindow(ob_display, self->leftresize); - XMapWindow(ob_display, self->rightresize); } else { XUnmapWindow(ob_display, self->topresize); XUnmapWindow(ob_display, self->tltresize); XUnmapWindow(ob_display, self->tllresize); XUnmapWindow(ob_display, self->trtresize); XUnmapWindow(ob_display, self->trrresize); - XUnmapWindow(ob_display, self->leftresize); - XUnmapWindow(ob_display, self->rightresize); } } else XUnmapWindow(ob_display, self->title); @@ -466,6 +453,28 @@ void frame_adjust_area(ObFrame *self, gboolean moved, } else XUnmapWindow(ob_display, self->handle); + if (self->decorations & OB_FRAME_DECOR_GRIPS) { + XMoveResizeWindow(ob_display, self->leftresize, + -(ob_rr_theme->fbwidth * 2) - 1, + 0, + 1, + self->client->area.height + + self->cbwidth_y * 2); + XMoveResizeWindow(ob_display, self->rightresize, + self->client->area.width + + self->cbwidth_x * 2, + 0, + 1, + self->client->area.height + + self->cbwidth_y * 2); + + XMapWindow(ob_display, self->leftresize); + XMapWindow(ob_display, self->rightresize); + } else { + XUnmapWindow(ob_display, self->leftresize); + XUnmapWindow(ob_display, self->rightresize); + } + /* move and resize the inner border window which contains the plate */ XMoveResizeWindow(ob_display, self->inner,