From 0b304d487c3da673168e4423087382ac40eb4b44 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <fourdan.olivier@wanadoo.fr>
Date: Thu, 2 Dec 2004 20:24:33 +0000
Subject: [PATCH] Update client opacity when transset chages the value on the
 frame (so that opacity gets properly restored after a moved/resize)

(Old svn revision: 12172)
---
 src/compositor.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/compositor.c b/src/compositor.c
index 20f7c70c0..5e327ca74 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1730,6 +1730,8 @@ compositorHandlePropertyNotify (DisplayInfo *display_info, XPropertyEvent *ev)
 
         if (cw)
         {
+            Client *c = cw->c;
+            
             TRACE ("Opacity changed for 0x%lx", cw->id);
             if (!getOpacity (display_info, cw->id, &cw->opacity))
             {
@@ -1737,6 +1739,18 @@ compositorHandlePropertyNotify (DisplayInfo *display_info, XPropertyEvent *ev)
                 cw->opacity = NET_WM_OPAQUE;
             }
             set_win_opacity (cw, cw->opacity);
+
+            /* Transset changes the property on the frame, not the client 
+               window. We need to check and update the client "opacity"
+               value accordingly.
+              */
+            if (c)
+            {
+                if (c->opacity != cw->opacity)
+                {
+                    c->opacity = cw->opacity;
+                }
+            }
         }
     }
     else
-- 
GitLab