]> Dogcows Code - chaz/openbox/commitdiff
Some versions of X, have the Shape extension, but apparently not "ShapeInput" (Fixes...
authorPhilip Brown <phil@bolthole.com>
Sat, 16 Oct 2010 20:13:36 +0000 (16:13 -0400)
committerDana Jansens <danakj@orodu.net>
Mon, 24 Jan 2011 19:19:23 +0000 (14:19 -0500)
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

openbox/event.c
openbox/frame.c

index b0a53dba8c0716c0f904f0f8ad484cdf34aca2f7..8a52402ecc63212cc181dc39c68eb7dff63c70bd 100644 (file)
@@ -1695,10 +1695,12 @@ static void event_handle_client(ObClient *client, XEvent *e)
                         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();
                 }
index 8a9a5a6462800b7aad364ab6a39a05b1163279f2..db4b976d360c5ff0aafb8c8b19a5402b94032897 100644 (file)
@@ -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,
This page took 0.029787 seconds and 4 git commands to generate.