Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


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


Log Message:
Make shadow on/off change effectve immediately.

===================================================================
RCS file: /cvs/e/e16/e/src/ecompmgr.c,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -3 -r1.137 -r1.138
--- ecompmgr.c  4 Feb 2007 22:42:50 -0000       1.137
+++ ecompmgr.c  7 Feb 2007 01:51:18 -0000       1.138
@@ -1275,6 +1275,9 @@
 {
    ECmWinInfo         *cw = eo->cmhook;
 
+   if (op_from == op_to && op_from == eo->opacity)
+      return;
+
    if (!cw->anim_fade)
       cw->anim_fade = AnimatorAdd(doECompMgrWinFade, eo);
    cw->opacity_to = op_to;
@@ -1556,6 +1559,33 @@
    ECmWinInfo         *cw = eo->cmhook;
 
    ECompMgrDamageMergeObject(eo, cw->shape, 0);
+}
+
+void
+ECompMgrWinChangeShadow(EObj * eo, int shadow)
+{
+   ECmWinInfo         *cw = eo->cmhook;
+
+   if (!cw || !eo->shown)
+      goto done;
+
+   if (!shadow && eo->shadow)
+     {
+       /* Disable shadow */
+       ECompMgrDamageMergeObject(eo, cw->extents, 1);
+       cw->extents = None;
+       ECompMgrWinInvalidate(eo, INV_SHADOW);
+     }
+   else if (shadow && !eo->shadow)
+     {
+       /* Enable shadow */
+       ECompMgrWinInvalidate(eo, INV_SHADOW);
+       eo->shadow = shadow;
+       cw->extents = win_extents(eo);
+       ECompMgrDamageMergeObject(eo, cw->extents, 0);
+     }
+ done:
+   eo->shadow = shadow;
 }
 
 static void
===================================================================
RCS file: /cvs/e/e16/e/src/ecompmgr.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- ecompmgr.h  13 Jan 2007 19:14:27 -0000      1.32
+++ ecompmgr.h  7 Feb 2007 01:51:18 -0000       1.33
@@ -52,6 +52,7 @@
 void                ECompMgrWinRaiseLower(EObj * eo, int delta);
 void                ECompMgrWinChangeShape(EObj * eo);
 void                ECompMgrWinChangeOpacity(EObj * eo, unsigned int opacity);
+void                ECompMgrWinChangeShadow(EObj * eo, int shadow);
 Pixmap              ECompMgrWinGetPixmap(const EObj * eo);
 
 void                ECompMgrConfigGet(cfg_composite * cfg);
===================================================================
RCS file: /cvs/e/e16/e/src/eobj.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -3 -r1.90 -r1.91
--- eobj.c      17 Jan 2007 01:10:42 -0000      1.90
+++ eobj.c      7 Feb 2007 01:51:18 -0000       1.91
@@ -557,6 +557,14 @@
 #endif
 }
 
+#if USE_COMPOSITE
+void
+EobjChangeShadow(EObj * eo, int shadow)
+{
+   ECompMgrWinChangeShadow(eo, shadow);
+}
+#endif
+
 void
 EobjSlideTo(EObj * eo, int fx, int fy, int tx, int ty, int speed)
 {
===================================================================
RCS file: /cvs/e/e16/e/src/eobj.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- eobj.h      17 Jan 2007 01:10:43 -0000      1.39
+++ eobj.h      7 Feb 2007 01:51:18 -0000       1.40
@@ -44,13 +44,13 @@
    char                sticky;
    char                floating;
    unsigned            external:1;
+   unsigned            argb:1;
    unsigned            inputonly:1;
    unsigned            shown:1;
    unsigned            gone:1;
    unsigned            noredir:1;      /* Do not redirect */
    unsigned            shadow:1;       /* Enable shadows */
-   unsigned            fade:1;
-   unsigned            argb:1;
+   unsigned            fade:1; /* Enable fading */
 #if USE_COMPOSITE
    unsigned int        opacity;
    ECmWinInfo         *cmhook;
@@ -114,16 +114,16 @@
 #define EoChangeOpacity(eo, _o) EobjChangeOpacity(EoObj(eo), _o)
 #define EoSetFade(eo, _x)       EoObj(eo)->fade = (_x)
 #define EoSetNoRedirect(eo, _x) EoObj(eo)->noredir = (_x)
+#define EoSetOpacity(eo, _o)    EoObj(eo)->opacity = (_o)
 #define EoSetShadow(eo, _x)     EoObj(eo)->shadow = (_x)
 #if USE_COMPOSITE
-#define EoSetOpacity(eo, _o)    EoObj(eo)->opacity = (_o)
 #define EoGetOpacity(eo)        (EoObj(eo)->opacity)
 #define EoGetFade(eo)           (EoObj(eo)->fade)
+#define EoChangeShadow(eo, _x)  EobjChangeShadow(EoObj(eo), _x)
 #define EoGetShadow(eo)         (EoObj(eo)->shadow)
 #define EoGetNoRedirect(eo)     (EoObj(eo)->noredir)
 #define EoGetSerial(eo)         (EoObj(eo)->serial)
 #else
-#define EoSetOpacity(eo, _o)
 #define EoGetSerial(eo)         0
 #endif
 
@@ -166,6 +166,7 @@
 void                EobjsRepaint(void);
 Pixmap              EobjGetPixmap(const EObj * eo);
 void                EobjChangeOpacity(EObj * eo, unsigned int opacity);
+void                EobjChangeShadow(EObj * eo, int shadow);
 void                EobjSetLayer(EObj * eo, int layer);
 void                EobjSetFloating(EObj * eo, int floating);
 int                 EobjIsShaped(const EObj * eo);
===================================================================
RCS file: /cvs/e/e16/e/src/ipc.c,v
retrieving revision 1.290
retrieving revision 1.291
diff -u -3 -r1.290 -r1.291
--- ipc.c       4 Feb 2007 01:01:15 -0000       1.290
+++ ipc.c       7 Feb 2007 01:51:18 -0000       1.291
@@ -923,7 +923,7 @@
      case EWIN_OP_SHADOW:
        on = EoGetShadow(ewin);
        if (SetEwinBoolean(wop->name, &on, param1, 1))
-          EoSetShadow(ewin, on);
+          EoChangeShadow(ewin, on);
        break;
 
      case EWIN_OP_NO_REDIRECT:



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to