kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=5b071a0e261abb12d75f36a24251e57a1a5b6ca9

commit 5b071a0e261abb12d75f36a24251e57a1a5b6ca9
Author: Kim Woelders <[email protected]>
Date:   Fri Apr 29 18:52:09 2022 +0200

    CM: Fix sharp shadows when window is shaped
    
    This once did work. I wonder when it broke.
---
 src/ecompmgr.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/ecompmgr.c b/src/ecompmgr.c
index f4efff5c..38525925 100644
--- a/src/ecompmgr.c
+++ b/src/ecompmgr.c
@@ -1869,7 +1869,6 @@ ECompMgrRepaintObj(EX_Picture pbuf, EX_SrvRegion region, 
EObj * eo, int mode)
        if (clip == NoXID)
           clip = ECompMgrRepaintObjSetClip(rgn_clip, region, cw->clip, x, y);
        ERegionSubtractOffset(clip, x, y, cw->shape, Mode_compmgr.rgn_tmp);
-       EPictureSetClip(pbuf, clip);
 
        switch (Mode_compmgr.shadow_mode)
          {
@@ -1882,6 +1881,9 @@ ECompMgrRepaintObj(EX_Picture pbuf, EX_SrvRegion region, 
EObj * eo, int mode)
                                               Mode_compmgr.opac_sharp),
                                       Conf_compmgr.shadows.color);
             alpha = cw->shadow_alpha ? cw->shadow_alpha : transBlackPicture;
+            ERegionIntersectOffset(clip, cw->shadow_dx, cw->shadow_dy,
+                                   cw->shape, Mode_compmgr.rgn_tmp);
+            EPictureSetClip(pbuf, clip);
             if (Mode_compmgr.shadow_mode == ECM_SHADOWS_SHARP)
                XRenderComposite(disp, PictOpOver, alpha, cw->picture, pbuf,
                                 0, 0, 0, 0,
@@ -1906,6 +1908,7 @@ ECompMgrRepaintObj(EX_Picture pbuf, EX_SrvRegion region, 
EObj * eo, int mode)
                                       OP32To8(cw->opacity),
                                       Conf_compmgr.shadows.color);
             alpha = (cw->pict_alpha) ? cw->pict_alpha : transBlackPicture;
+            EPictureSetClip(pbuf, clip);
             XRenderComposite(disp, PictOpOver, alpha, cw->shadow_pict, pbuf,
                              0, 0, 0, 0,
                              x + cw->rcx + cw->shadow_dx,

-- 


Reply via email to