Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


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


Log Message:
Prepare for change in background handling when composite is enabled.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.202
retrieving revision 1.203
diff -u -3 -r1.202 -r1.203
--- desktops.c  27 Nov 2005 13:11:05 -0000      1.202
+++ desktops.c  29 Nov 2005 18:04:01 -0000      1.203
@@ -27,6 +27,7 @@
 #include "buttons.h"
 #include "desktops.h"
 #include "dialog.h"
+#include "ecompmgr.h"
 #include "emodule.h"
 #include "eobj.h"
 #include "ewins.h"
@@ -503,10 +504,42 @@
 }
 
 static void
-DeskBackgroundFree(Desk * dsk, int force)
+DeskBackgroundConfigure(Desk * dsk, int set, Pixmap pmap, unsigned int pixel)
 {
    Window              win;
 
+   win = EoGetWin(dsk);
+
+   if (set)
+     {
+       if (!ECompMgrDeskConfigure(dsk, set, pmap, pixel))
+         {
+            if (pmap != None)
+               ESetWindowBackgroundPixmap(win, pmap);
+            else
+               ESetWindowBackground(win, pixel);
+            EClearWindow(win);
+         }
+
+       if (pmap != None)
+          BackgroundPixmapSet(dsk->bg, pmap);
+       HintsSetRootInfo(win, pmap, pixel);
+     }
+   else
+     {
+       if (!Conf.hints.set_xroot_info_on_root_window)
+          HintsSetRootInfo(win, None, 0);
+
+       if (!ECompMgrDeskConfigure(dsk, set, pmap, pixel))
+         {
+            ESetWindowBackgroundPixmap(win, None);
+         }
+     }
+}
+
+static void
+DeskBackgroundFree(Desk * dsk, int force)
+{
    if (!dsk->bg_isset)
       return;
 
@@ -526,12 +559,7 @@
      }
 
    if (!dsk->viewable)
-     {
-       win = EoGetWin(dsk);
-       if (!Conf.hints.set_xroot_info_on_root_window)
-          HintsSetRootInfo(win, None, 0);
-       ESetWindowBackgroundPixmap(win, None);
-     }
+      DeskBackgroundConfigure(dsk, 0, None, 0);
 }
 
 static void
@@ -561,18 +589,7 @@
       BackgroundRealize(bg, EoGetWin(dsk), EoGetW(dsk), EoGetH(dsk), 1,
                        &pmap, &pixel);
 
-   if (pmap != None)
-     {
-       ESetWindowBackgroundPixmap(EoGetWin(dsk), pmap);
-       BackgroundPixmapSet(dsk->bg, pmap);
-     }
-   else
-     {
-       ESetWindowBackground(EoGetWin(dsk), pixel);
-     }
-   EClearWindow(EoGetWin(dsk));
-
-   HintsSetRootInfo(EoGetWin(dsk), pmap, pixel);
+   DeskBackgroundConfigure(dsk, 1, pmap, pixel);
    dsk->pmap = pmap;
    dsk->bg_isset = 1;
 }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ecompmgr.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -3 -r1.81 -r1.82
--- ecompmgr.c  21 Nov 2005 17:48:44 -0000      1.81
+++ ecompmgr.c  29 Nov 2005 18:04:01 -0000      1.82
@@ -479,6 +479,18 @@
  * Desktops (move to desktops.c?)
  */
 
+int
+ECompMgrDeskConfigure(Desk * dsk, int set, Pixmap pmap, unsigned int pixel)
+{
+   /* FIXME - To be implemented */
+   dsk = NULL;
+   set = 0;
+   pmap = None;
+   pixel = 0;
+
+   return 0;
+}
+
 static              Picture
 DeskBackgroundPictureGet(Desk * dsk)
 {
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ecompmgr.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- ecompmgr.h  19 Oct 2005 19:32:00 -0000      1.21
+++ ecompmgr.h  29 Nov 2005 18:04:01 -0000      1.22
@@ -39,7 +39,8 @@
 
 int                 EVisualIsARGB(Visual * vis);
 
-void                ECompMgrRepaint(void);
+int                 ECompMgrDeskConfigure(struct _desk *dsk, int set,
+                                         Pixmap pmap, unsigned int pixel);
 
 void                ECompMgrWinNew(EObj * eo);
 void                ECompMgrWinDel(EObj * eo);
@@ -52,19 +53,23 @@
 void                ECompMgrWinRaise(EObj * eo);
 void                ECompMgrWinLower(EObj * eo);
 void                ECompMgrWinChangeShape(EObj * eo);
-
 void                ECompMgrWinChangeOpacity(EObj * eo, unsigned int opacity);
 Pixmap              ECompMgrWinGetPixmap(const EObj * eo);
+
 void                ECompMgrConfigGet(cfg_composite * cfg);
 void                ECompMgrConfigSet(const cfg_composite * cfg);
 
 void                ECompMgrMoveResizeFix(EObj * eo, int x, int y, int w,
                                          int h);
 
+void                ECompMgrRepaint(void);
+
 #else
 
 #define EVisualIsARGB(vis)      0
 
+#define ECompMgrDeskConfigure(dsk, set, pmap, pixel) 0
+
 #endif
 
 #endif /* _ECOMPMGR_H */




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to