Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        ecompmgr.c ecompmgr.h eobj.c main.c 


Log Message:
Composite manager fixes and cleanups.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ecompmgr.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- ecompmgr.c  2 Jun 2005 19:02:13 -0000       1.34
+++ ecompmgr.c  5 Jun 2005 15:15:59 -0000       1.35
@@ -970,39 +970,21 @@
    ECompMgrWinSetPicts(eo);
 }
 
-static void
-finish_unmap_win(EObj * eo)
+void
+ECompMgrWinUnmap(EObj * eo)
 {
    ECmWinInfo         *cw = eo->cmhook;
 
-   cw->visible = 0;
-
-#if 0
-   cw->damaged = 0;
-
-#if CAN_DO_USABLE
-   cw->usable = False;
-#endif
+   D1printf("ECompMgrWinUnmap %#lx\n", eo->win);
 
-   ECompMgrWinInvalidate(eo, INV_SIZE);
+   cw->visible = 0;
 
    if (cw->extents != None)
-     {
-       ECompMgrDamageMerge(eo->desk, cw->extents, 1);
-       cw->extents = None;
-     }
-#else
-   if (cw->extents != None)
       ECompMgrDamageMerge(eo->desk, cw->extents, 0);
-#endif
-}
-
-void
-ECompMgrWinUnmap(EObj * eo)
-{
-   D1printf("ECompMgrWinUnmap %#lx\n", eo->win);
 
-   finish_unmap_win(eo);
+#if 0                          /* FIXME - Invalidate stuff? */
+   ECompMgrWinInvalidate(eo, INV_SIZE);
+#endif
 }
 
 static void
@@ -1261,33 +1243,8 @@
       ECompMgrDamageMerge(eo->desk, cw->extents, 0);
 }
 
-static void
-finish_destroy_win(EObj * eo, Bool gone)
-{
-   ECmWinInfo         *cw = eo->cmhook;
-
-   if (!gone)
-      finish_unmap_win(eo);
-
-   ECompMgrWinInvalidate(eo, INV_ALL);
-
-   if (cw->picture != None)
-     {
-       XRenderFreePicture(disp, cw->picture);
-       cw->picture = None;
-     }
-
-   if (cw->damage != None)
-     {
-       XDamageDestroy(disp, cw->damage);
-       cw->damage = None;
-     }
-
-   _EFREE(eo->cmhook);
-}
-
 void
-ECompMgrWinDel(EObj * eo, Bool gone, Bool do_fade __UNUSED__)
+ECompMgrWinDel(EObj * eo)
 {
    ECmWinInfo         *cw = eo->cmhook;
 
@@ -1311,7 +1268,20 @@
      }
 
    if (cw)
-      finish_destroy_win(eo, gone);
+     {
+       ECompMgrWinInvalidate(eo, INV_ALL);
+
+       if (!eo->gone)
+         {
+            if (cw->picture != None)
+               XRenderFreePicture(disp, cw->picture);
+
+            if (cw->damage != None)
+               XDamageDestroy(disp, cw->damage);
+         }
+
+       _EFREE(eo->cmhook);
+     }
 }
 
 static void
@@ -1647,7 +1617,7 @@
    Picture             pict, pbuf;
    Desk               *d = DeskGet(0);
 
-   if (!Conf_compmgr.enable)
+   if (!Conf_compmgr.enable || allDamage == None)
       return;
 
    region = XFixesCreateRegion(disp, 0, 0);
@@ -1917,7 +1887,7 @@
             if (lst[i]->type == EOBJ_TYPE_EXT)
                EobjUnregister(lst[i]); /* Modifies the object stack! */
             else
-               ECompMgrWinDel(lst[i], False, False);
+               ECompMgrWinDel(lst[i]);
          }
        Efree(lst);
      }
@@ -2061,7 +2031,7 @@
           goto case_CreateNotify;
        eo = EobjListStackFind(ev->xreparent.window);
        if (eo)
-          ECompMgrWinDel(eo, False, True);
+          ECompMgrWinDel(eo);
 #endif
        break;
 #endif
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ecompmgr.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- ecompmgr.h  14 May 2005 09:19:51 -0000      1.14
+++ ecompmgr.h  5 Jun 2005 15:15:59 -0000       1.15
@@ -37,7 +37,7 @@
 void                ECompMgrRepaint(void);
 
 void                ECompMgrWinNew(EObj * eo);
-void                ECompMgrWinDel(EObj * eo, Bool gone, Bool do_fade);
+void                ECompMgrWinDel(EObj * eo);
 void                ECompMgrWinMap(EObj * eo);
 void                ECompMgrWinUnmap(EObj * eo);
 void                ECompMgrWinMoveResize(EObj * eo, int change_xy,
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/eobj.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- eobj.c      2 Jun 2005 17:44:41 -0000       1.32
+++ eobj.c      5 Jun 2005 15:15:59 -0000       1.33
@@ -179,7 +179,7 @@
       Eprintf("EobjFini: %#lx %s\n", eo->win, eo->name);
 
 #if USE_COMPOSITE
-   ECompMgrWinDel(eo, False, False);
+   ECompMgrWinDel(eo);
 #endif
 
    EobjListStackDel(eo);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/main.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -3 -r1.128 -r1.129
--- main.c      28 May 2005 06:23:51 -0000      1.128
+++ main.c      5 Jun 2005 15:15:59 -0000       1.129
@@ -269,8 +269,10 @@
    if (Mode.wm.window)
       EMapWindow(VRoot.win);
 
+#if 0                          /* FIXME - Remove? */
    /* sync just to make sure */
    ESync();
+#endif
 
    /* let's make sure we set this up and go to our desk anyways */
    DeskGoto(DesksGetCurrent());




-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to