Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h desktops.c ecompmgr.c 


Log Message:
Map virtual roots at creation (before creating named pixmaps for clients).
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.467
retrieving revision 1.468
diff -u -3 -r1.467 -r1.468
--- E.h 10 Jul 2005 20:16:47 -0000      1.467
+++ E.h 11 Jul 2005 18:02:45 -0000      1.468
@@ -567,9 +567,6 @@
    int                 current_area_x;
    int                 current_area_y;
    long                event_mask;
-#if USE_COMPOSITE
-   Pixmap              pmap;
-#endif
 } Desk;
 
 typedef struct _constraints
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -3 -r1.155 -r1.156
--- desktops.c  10 Jul 2005 08:31:06 -0000      1.155
+++ desktops.c  11 Jul 2005 18:02:54 -0000      1.156
@@ -386,6 +386,9 @@
      }
    DeskSetBg(d->num, bg, 0);
 
+   if (d->num > 0)
+      EoMap(d, 0);
+
    ModulesSignal(ESIGNAL_DESK_ADDED, ((void *)(long)(d->num)));
 }
 
@@ -830,9 +833,6 @@
       return;
 
    BackgroundApply(bg, EoGetWin(d), 1);
-#if USE_COMPOSITE
-   d->pmap = None;
-#endif
    HintsSetRootInfo(EoGetWin(d),
                    BackgroundGetPixmap(bg), BackgroundGetColor(bg));
 }
@@ -1058,10 +1058,6 @@
        for (i = Conf.desks.num - 1; i > 0; i--)
           DeskHide(desks.order[i]);
      }
-   else
-     {
-       EoMap(d, 0);
-     }
 
    MoveStickyWindowsToCurrentDesk();
    MoveStickyButtonsToCurrentDesk();
@@ -1164,8 +1160,6 @@
 
    d->viewable = 1;
    DeskRefresh(desk);
-   if (desk != 0)
-      EoMap(d, 0);
 }
 
 static void
@@ -1257,10 +1251,6 @@
        for (i = Conf.desks.num - 1; i > 0; i--)
           DeskHide(desks.order[i]);
      }
-   else
-     {
-       EoMap(d, 0);
-     }
 }
 
 #define _APPEND_TO_WIN_LIST(win) \
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ecompmgr.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- ecompmgr.c  10 Jul 2005 20:16:47 -0000      1.41
+++ ecompmgr.c  11 Jul 2005 18:02:56 -0000      1.42
@@ -346,28 +346,35 @@
 
    if (!cw)
      {
+#if 0                          /* FIXME - Remove? */
        ECompMgrWinNew(&d->o);
        cw = d->o.cmhook;
        if (!cw)
+#endif
           return None;
      }
 
-   if (cw->picture != None)
-     {
-       if (d->pmap)
-          return cw->picture;
-       XRenderFreePicture(disp, cw->picture);
-     }
-
    fill = False;
    pmap = BackgroundGetPixmap(DeskGetBackground(d->num));
-   D1printf("DeskBackgroundPictureGet: Desk %d: using pixmap %#lx\n", d->num,
-           pmap);
-   if (!pmap)
+   if (pmap == None)
      {
+       if (cw->pixmap && cw->picture)
+          return cw->picture;
        pmap = XCreatePixmap(disp, VRoot.win, 1, 1, VRoot.depth);
        fill = True;
      }
+   else if (pmap == cw->pixmap)
+     {
+       if (cw->picture != None)
+          return cw->picture;
+       Eprintf("*** This is not possible :/\n");
+     }
+   D1printf
+      ("DeskBackgroundPictureGet: Desk %d: using pixmap %#lx (%#lx %#lx)\n",
+       d->num, pmap, cw->pixmap, cw->picture);
+
+   if (cw->picture)
+      XRenderFreePicture(disp, cw->picture);
 
    pa.repeat = True;
    pictfmt = XRenderFindVisualFormat(disp, VRoot.vis);
@@ -381,6 +388,7 @@
        c.red = c.green = c.blue = 0x8080;
        c.alpha = 0xffff;
        XRenderFillRectangle(disp, PictOpSrc, pict, &c, 0, 0, 1, 1);
+       XFreePixmap(disp, pmap);
      }
 
 #if 0                          /* FIXME - Not in window mode? */
@@ -388,7 +396,7 @@
    ECompMgrDamageAll();
 #endif
 
-   d->pmap = pmap;
+   cw->pixmap = pmap;
    cw->picture = pict;
 
    return pict;
@@ -988,7 +996,9 @@
 
    if (eo->type == EOBJ_TYPE_DESK)
      {
+#if 0                          /* FIXME - Get this right */
        if (cw->picture == None)
+#endif
          {
             cw->picture = DeskBackgroundPictureGet((Desk *) eo);
             cw->damaged = 1;   /* FIXME - ??? */
@@ -1236,6 +1246,7 @@
    if (eo->type == EOBJ_TYPE_DESK)
      {
        DeskBackgroundPictureFree((Desk *) eo);
+       cw->pixmap = None;
      }
    else
      {




-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to