From: Enlightenment S. <no-...@en...> - 2010-09-23 21:49:33
|
Log: Fix rendering of translucent shaped windows. Once upon a time this did work. It looks like XRenderComposite(... PictOpOver ...) no longer respects the shape of a window based source picture. Setting clip on it seems entirely broken. There were problems anyway when setting use_name_pixmap, and this fix seems to take care of it all. Author: kwo Date: 2010-09-23 14:49:24 -0700 (Thu, 23 Sep 2010) New Revision: 52655 Modified: trunk/E16/e/src/ecompmgr.c Modified: trunk/E16/e/src/ecompmgr.c =================================================================== --- trunk/E16/e/src/ecompmgr.c 2010-09-23 20:58:19 UTC (rev 52654) +++ trunk/E16/e/src/ecompmgr.c 2010-09-23 21:49:24 UTC (rev 52655) @@ -1204,16 +1204,6 @@ pictfmt, CPSubwindowMode, &pa); D1printf("ECompMgrWinSetPicts %#lx: Pict=%#lx (drawable=%#lx)\n", EobjGetXwin(eo), cw->picture, draw); - - /* Hmm.. What good does this actually do? */ - if (draw == cw->pixmap && EobjIsShaped(eo)) - { - XserverRegion clip; - - clip = ERegionCreateFromWindow(EobjGetWin(eo)); - EPictureSetClip(cw->picture, clip); - ERegionDestroy(clip); - } } } @@ -1780,7 +1770,7 @@ ECmWinInfo *cw; Desk *dsk = eo->desk; int x, y; - XserverRegion clip; + XserverRegion clip, clip2; Picture alpha; cw = eo->cmhook; @@ -1829,9 +1819,15 @@ case WINDOW_TRANS: case WINDOW_ARGB: clip = ECompMgrRepaintObjSetClip(rgn_clip, region, cw->clip, x, y); + clip2 = clip; + if (WinIsShaped(EobjGetWin(eo))) + { + clip2 = ERegionCopy(rgn_tmp, clip); + ERegionIntersect(clip2, cw->shape); + } if (EDebug(EDBUG_TYPE_COMPMGR2)) ECompMgrWinDumpInfo("ECompMgrRepaintObj trans", eo, clip, 0); - EPictureSetClip(pbuf, clip); + EPictureSetClip(pbuf, clip2); if (cw->opacity != OPAQUE && !cw->pict_alpha) cw->pict_alpha = EPictureCreateSolid(Mode_compmgr.root, True, |