From 5dc49e9e3063602c1d7cccde58e5136618a74275 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <fourdan.olivier@wanadoo.fr>
Date: Tue, 4 Jul 2006 17:42:32 +0000
Subject: [PATCH] Fix small shape bug introduded yesterday

(Old svn revision: 22259)
---
 src/frame.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/frame.c b/src/frame.c
index 5dba6b18a..b204379ab 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -541,7 +541,16 @@ frameSetShape (Client * c, int state, ClientPixmapCache * pm_cache, int button_x
 
     temp = XCreateSimpleWindow (display_info->dpy, c->frame, 0, 0, frameWidth (c), frameHeight (c), 0, 0, 0);
 
-    if (!FLAG_TEST (c->flags, CLIENT_FLAG_SHADED))
+    if (FLAG_TEST (c->flags, CLIENT_FLAG_SHADED))
+    {
+        rect.x = 0;
+        rect.y = 0;
+        rect.width  = frameWidth (c);
+        rect.height = frameHeight (c);
+        XShapeCombineRectangles (display_info->dpy, temp, ShapeBounding, 0, 0, &rect, 1,
+                                 ShapeSubtract, 0);
+    }
+    else
     {
         XShapeCombineShape (display_info->dpy, temp, ShapeBounding, frameLeft (c),
                             frameTop (c), c->window, ShapeBounding, ShapeSet);
-- 
GitLab