summaryrefslogtreecommitdiff
path: root/openbox/frame.c
diff options
context:
space:
mode:
authorPhilip Brown <phil@bolthole.com>2010-10-16 16:13:36 -0400
committerDana Jansens <danakj@orodu.net>2011-01-24 14:19:23 -0500
commit9c356d370ab3e5a6b28e38ce8289d80bf35c8828 (patch)
tree4342627d672e6393985a8f54f63a1729b79b52a6 /openbox/frame.c
parent7c33f45e09350bdd40990ef98cf4765d780263fe (diff)
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
Diffstat (limited to 'openbox/frame.c')
-rw-r--r--openbox/frame.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/openbox/frame.c b/openbox/frame.c
index 8a9a5a64..db4b976d 100644
--- a/openbox/frame.c
+++ b/openbox/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,8 +328,10 @@ void frame_adjust_shape(ObFrame *self)
{
#ifdef SHAPE
frame_adjust_shape_kind(self, ShapeBounding);
+#ifdef ShapeInput
frame_adjust_shape_kind(self, ShapeInput);
#endif
+#endif
}
void frame_adjust_area(ObFrame *self, gboolean moved,