X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fframe.c;h=c633fa6d1285b729781ba78e8fa1badfd657f33e;hb=4145468a1984e1055a947ad957075ae51f70ca9c;hp=30630fbb53c3806598026d367c48b281e0c61ba2;hpb=90cecafa3de2f118e550622932d1d30266c71226;p=chaz%2Fopenbox diff --git a/openbox/frame.c b/openbox/frame.c index 30630fbb..c633fa6d 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -265,25 +265,26 @@ void frame_adjust_theme(ObFrame *self) set_theme_statics(self); } -void frame_adjust_shape(ObFrame *self) -{ #ifdef SHAPE +void frame_adjust_shape_kind(ObFrame *self, int kind) +{ gint num; XRectangle xrect[2]; - if (!self->client->shaped) { + if (!((kind == ShapeBounding && self->client->shaped) || + (kind == ShapeInput && self->client->shaped_input))) { /* clear the shape on the frame window */ - XShapeCombineMask(obt_display, self->window, ShapeBounding, + XShapeCombineMask(obt_display, self->window, kind, self->size.left, self->size.top, None, ShapeSet); } else { /* make the frame's shape match the clients */ - XShapeCombineShape(obt_display, self->window, ShapeBounding, + XShapeCombineShape(obt_display, self->window, kind, self->size.left, self->size.top, self->client->window, - ShapeBounding, ShapeSet); + kind, ShapeSet); num = 0; if (self->decorations & OB_FRAME_DECOR_TITLEBAR) { @@ -309,6 +310,14 @@ void frame_adjust_shape(ObFrame *self) ShapeBounding, 0, 0, xrect, num, ShapeUnion, Unsorted); } +} +#endif + +void frame_adjust_shape(ObFrame *self) +{ +#ifdef SHAPE + frame_adjust_shape_kind(self, ShapeBounding); + frame_adjust_shape_kind(self, ShapeInput); #endif }