Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        pager.c 


Log Message:
Fix inappropriate re-use of cached mini-window image pixmaps.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -3 -r1.94 -r1.95
--- pager.c     15 Jun 2004 22:11:33 -0000      1.94
+++ pager.c     16 Jun 2004 19:55:41 -0000      1.95
@@ -543,6 +543,7 @@
             ewin->mini_pmm.type = 0;
             ewin->mini_pmm.pmap =
                ECreatePixmap(disp, p->win, w, h, VRoot.depth);
+            ewin->mini_pmm.mask = None;
             ScaleRect(ewin->mini_pmm.pmap, ewin->win, 0, 0, 0, 0, ewin->w,
                       ewin->h, w, h);
          }
@@ -577,7 +578,10 @@
    if (!gc)
       gc = XCreateGC(disp, p->pmap, 0, &gcv);
 
-   if ((ewin->mini_w != w) || (ewin->mini_h != h))
+   /* NB! If the pixmap/mask was created by imlib, free it. Due to imlibs */
+   /*     image/pixmap cache it may be in use elsewhere. */
+   if (ewin->mini_pmm.pmap &&
+       ((ewin->mini_pmm.type) || (ewin->mini_w != w) || (ewin->mini_h != h)))
       FreePmapMask(&ewin->mini_pmm);
 
    if (!ewin->mini_pmm.pmap)
@@ -586,6 +590,7 @@
        ewin->mini_h = h;
        ewin->mini_pmm.type = 0;
        ewin->mini_pmm.pmap = ECreatePixmap(disp, p->win, w, h, VRoot.depth);
+       ewin->mini_pmm.mask = None;
      }
    XCopyArea(disp, p->pmap, ewin->mini_pmm.pmap, gc, x, y, w, h, 0, 0);
 




-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to