+#ifdef ShapeInput
+ { /* when some smart people added ShapeInput they forgot to update XShapeQueryExtents or
+ add a new one for input shapes, so we get to do this instead, yay! */
+ int nrects, ordering;
+ XRectangle *input_rect = XShapeGetRectangles(obt_display, self->window,
+ ShapeInput, &nrects, &ordering);
+ if (nrects == 1 && input_rect->width == self->area.width &&
+ input_rect->height == self->area.height &&
+ /* openbox sets the border width of client windows to 0 */
+ input_rect->x == 0 && input_rect->y == 0) {
+ self->shaped_input = FALSE;
+ } else {
+ self->shaped_input = TRUE;
+ }
+ XFree(input_rect);
+ }
+#endif