summaryrefslogtreecommitdiff
path: root/openbox/frame.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2009-01-29 22:33:44 +0100
committerMikael Magnusson <mikachu@gmail.com>2009-01-29 22:35:56 +0100
commitc5d372ffd629eae89d28b37069c553049e5c7d20 (patch)
treee5c2c08b4d7d4d0a40a3b60e3893c759323f6423 /openbox/frame.c
parentcac78e1a7a953899f8b8e9dc5ea1910d2067864d (diff)
Handle InputShape type shaping too.
Many composite apps use this to pass through clicks where they are transparent.
Diffstat (limited to 'openbox/frame.c')
-rw-r--r--openbox/frame.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/openbox/frame.c b/openbox/frame.c
index 704560bd..5e60d11c 100644
--- a/openbox/frame.c
+++ b/openbox/frame.c
@@ -267,25 +267,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(ob_display, self->window, ShapeBounding,
+ XShapeCombineMask(ob_display, self->window, kind,
self->size.left,
self->size.top,
None, ShapeSet);
} else {
/* make the frame's shape match the clients */
- XShapeCombineShape(ob_display, self->window, ShapeBounding,
+ XShapeCombineShape(ob_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) {
@@ -308,9 +309,17 @@ void frame_adjust_shape(ObFrame *self)
}
XShapeCombineRectangles(ob_display, self->window,
- ShapeBounding, 0, 0, xrect, num,
+ kind, 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
}