Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        iconify.c 


Log Message:
Fix iconbox images for apps that are iconified at startup and have no icons.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -3 -r1.104 -r1.105
--- iconify.c   30 Apr 2004 20:05:22 -0000      1.104
+++ iconify.c   2 May 2004 11:38:26 -0000       1.105
@@ -692,8 +692,6 @@
    Iconbox            *ib;
    ImageClass         *ic;
 
-   if (!ewin->visible)
-      return;
    w = 40;
    h = 40;
    ib = SelectIconboxForEwin(ewin);
@@ -724,12 +722,24 @@
    ewin->icon_pmm.type = 0;
    ewin->icon_w = w;
    ewin->icon_h = h;
+
    ewin->icon_pmm.pmap = ECreatePixmap(disp, ewin->win, w, h, root.depth);
-   ScaleRect(ewin->icon_pmm.pmap, ewin->win, 0, 0, 0, 0, ewin->w, ewin->h,
-            w, h);
-   r = EShapeGetRectangles(disp, ewin->win, ShapeBounding, &rn, &ord);
+   if (ewin->visible)
+     {
+       ScaleRect(ewin->icon_pmm.pmap, ewin->win, 0, 0, 0, 0, ewin->w, ewin->h,
+                 w, h);
+     }
+   else
+     {
+       gc = XCreateGC(disp, ewin->icon_pmm.pmap, 0, &gcv);
+       XSetForeground(disp, gc, BlackPixel(disp, root.scr));
+       XFillRectangle(disp, ewin->icon_pmm.pmap, gc, 0, 0, w, h);
+       XFreeGC(disp, gc);
+     }
+
    ewin->icon_pmm.mask = ECreatePixmap(disp, ewin->win, w, h, 1);
    gc = XCreateGC(disp, ewin->icon_pmm.mask, 0, &gcv);
+   r = EShapeGetRectangles(disp, ewin->win, ShapeBounding, &rn, &ord);
    if (r)
      {
        XSetForeground(disp, gc, 0);
@@ -756,7 +766,6 @@
        XSetForeground(disp, gc, 1);
        XFillRectangle(disp, ewin->icon_pmm.mask, gc, 0, 0, w, h);
      }
-
    XFreeGC(disp, gc);
 
    if ((ewin->icon_w < 1) || (ewin->icon_h < 1))




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to