all repos — openbox @ 9c356d370ab3e5a6b28e38ce8289d80bf35c8828

openbox fork - make it a bit more like ryudo

Some versions of X, have the Shape extension, but apparently not "ShapeInput" (Fixes bug #4662)

the sawfish window manager has ifdefs for this sort of situation.
I followed suit, and #ifdef'd it, and it now works for me.
patch attached.

Slight changes to the patch from danakj@orodu.net for readability
Philip Brown phil@bolthole.com
commit

9c356d370ab3e5a6b28e38ce8289d80bf35c8828

parent

7c33f45e09350bdd40990ef98cf4765d780263fe

2 files changed, 11 insertions(+), 2 deletions(-)

jump to
M openbox/event.copenbox/event.c

@@ -1695,10 +1695,12 @@ case ShapeClip:

client->shaped = ((XShapeEvent*)e)->shaped; kind = ShapeBounding; break; +#ifdef ShapeInput case ShapeInput: client->shaped_input = ((XShapeEvent*)e)->shaped; kind = ShapeInput; break; +#endif default: g_assert_not_reached(); }
M openbox/frame.copenbox/frame.c

@@ -276,9 +276,14 @@ void frame_adjust_shape_kind(ObFrame *self, int kind)

{ gint num; XRectangle xrect[2]; + gboolean shaped; - if (!((kind == ShapeBounding && self->client->shaped) || - (kind == ShapeInput && self->client->shaped_input))) { + shaped = (kind == ShapeBounding && self->client->shaped); +#ifdef ShapeInput + shaped |= (kind == ShapeInput && self->client->shaped_input); +#endif + + if (!shaped) { /* clear the shape on the frame window */ XShapeCombineMask(obt_display, self->window, kind, self->size.left,

@@ -323,7 +328,9 @@ void frame_adjust_shape(ObFrame *self)

{ #ifdef SHAPE frame_adjust_shape_kind(self, ShapeBounding); +#ifdef ShapeInput frame_adjust_shape_kind(self, ShapeInput); +#endif #endif }