From f44bb443760f872d29e0bffba4fac0b8a9fd928e Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 28 May 2003 05:06:08 +0000 Subject: [PATCH] use the new shape API from the render libs --- openbox/frame.c | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/openbox/frame.c b/openbox/frame.c index 0fbd34f5..6bceabcd 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -65,7 +65,7 @@ Frame *frame_new() fd->window = RrSurfaceWindow(fd->surface); XSelectInput(ob_display, fd->window, ELEMENT_EVENTMASK); fd->anchor = Decor_Top; - RECT_SET(fd->area, 0, 0, 100, 20); + RECT_SET(fd->area, 0, 0, 50, 20); fd->type = Decor_Titlebar; fd->context = Context_Titlebar; fd->sizetypex = Decor_Relative; @@ -129,36 +129,9 @@ void frame_hide(Frame *self) void frame_adjust_shape(Frame *self) { -#ifdef SHAPE - int i; - FrameDecor *dec; - - /* make the pixmap's shape match the clients */ -printf("resize shape window to %x, %x\n", self->area.width, self->area.height); - XResizeWindow(ob_display, self->shapewindow, self->area.width, - self->area.height); - XShapeCombineShape(ob_display, self->shapewindow, ShapeBounding, - self->size.left, - self->size.top, - self->client->window, - ShapeBounding, ShapeSet); - for (i = 0; i < self->framedecors; i++) { - dec = &self->framedecor[i]; - if (dec->type & self->client->decorations) - XShapeCombineShape(ob_display, self->shapewindow, ShapeBounding, - dec->xoff, - dec->yoff, - dec->window, - ShapeBounding, ShapeUnion); - } - - XShapeCombineShape(ob_display, self->window, ShapeBounding, - 0, - 0, - self->shapewindow, - ShapeBounding, ShapeSet); - -#endif + RrSurfaceShapeSetBase(self->surface, self->client->window, + self->size.left, self->size.top); + RrSurfaceShape(self->surface); } void frame_adjust_state(Frame *self) -- 2.34.1