Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h actions.c ewmh.c mod-misc.c 


Log Message:
Startup id bits.

===================================================================
RCS file: /cvs/e/e16/e/src/E.h,v
retrieving revision 1.596
retrieving revision 1.597
diff -u -3 -r1.596 -r1.597
--- E.h 22 Sep 2007 08:55:15 -0000      1.596
+++ E.h 22 Sep 2007 10:21:17 -0000      1.597
@@ -423,6 +423,7 @@
       char                argb_clients_inherit_attr;
       int                 image_cache_size;
       int                 mask_alpha_threshold;
+      char                enable_startup_id;
    } testing;
 
    char                autosave;
@@ -565,6 +566,7 @@
 
 /* actions.c */
 #define EXEC_SET_LANG       0x01
+#define EXEC_SET_STARTUP_ID 0x02
 int                 execApplication(const char *params, int flags);
 void                Espawn(int argc, char **argv);
 void                EspawnCmd(const char *cmd);
===================================================================
RCS file: /cvs/e/e16/e/src/actions.c,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -3 -r1.216 -r1.217
--- actions.c   6 Sep 2007 16:02:48 -0000       1.216
+++ actions.c   22 Sep 2007 10:21:17 -0000      1.217
@@ -22,10 +22,26 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "E.h"
+#include "desktops.h"
 #include "file.h"
 #include "user.h"
 
 static void
+StartupIdExport(void)
+{
+   char                buf[128];
+   Desk               *dsk;
+   int                 ax, ay;
+
+   dsk = DesksGetCurrent();
+   DeskGetArea(dsk, &ax, &ay);
+
+   Esnprintf(buf, sizeof(buf), "e16/%d:%d:%d,%d", Mode.apps.startup_id,
+            dsk->num, ax, ay);
+   Esetenv("DESKTOP_STARTUP_ID", buf);
+}
+
+static void
 ExecSetupEnv(int flags)
 {
    int                 fd;
@@ -39,6 +55,9 @@
    /* Set up env stuff */
    if (flags & EXEC_SET_LANG)
       LangExport();
+   if (flags & EXEC_SET_STARTUP_ID)
+      StartupIdExport();
+
 #if USE_ROOTHACKLIB
    if (Mode.wm.window)
       Esetenv("LD_PRELOAD", ENLIGHTENMENT_LIB "/e16/libhack.so");
@@ -60,6 +79,7 @@
    if (exe[0] == '\0')
       return -1;
 
+   Mode.apps.startup_id++;
    if (fork())
       return 0;
 
===================================================================
RCS file: /cvs/e/e16/e/src/ewmh.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -3 -r1.119 -r1.120
--- ewmh.c      11 Jul 2007 09:14:12 -0000      1.119
+++ ewmh.c      22 Sep 2007 10:21:18 -0000      1.120
@@ -658,17 +658,17 @@
 static void
 EWMH_GetWindowStartupId(EWin * ewin)
 {
-#if 0                          /* TBD */
 #define TryGroup(e) (((e)->icccm.group != None) && ((e)->icccm.group != 
EwinGetClientXwin(e)))
    char               *str;
 
+   if (!Conf.testing.enable_startup_id)
+      return;
+
    ecore_x_netwm_startup_id_get(EwinGetClientXwin(ewin), &str);
    if (!str && TryGroup(ewin))
       ecore_x_netwm_startup_id_get(ewin->icccm.group, &str);
-   Eprintf("Startup id: %s: %s\n", EwinGetTitle(ewin), str);
-#else
-   ewin = NULL;
-#endif
+   if (str && EDebug(1))
+      Eprintf("Startup id: %s: %s\n", EwinGetTitle(ewin), str);
 }
 
 static void
===================================================================
RCS file: /cvs/e/e16/e/src/mod-misc.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -3 -r1.60 -r1.61
--- mod-misc.c  22 Sep 2007 08:55:16 -0000      1.60
+++ mod-misc.c  22 Sep 2007 10:21:18 -0000      1.61
@@ -194,6 +194,7 @@
    CFG_ITEM_BOOL(Conf, testing.argb_internal_clients, 0),
    CFG_ITEM_BOOL(Conf, testing.argb_clients, 0),
    CFG_ITEM_BOOL(Conf, testing.argb_clients_inherit_attr, 0),
+   CFG_ITEM_BOOL(Conf, testing.enable_startup_id, 1),
    CFG_FUNC_INT(Conf, testing.image_cache_size, -1, _CfgImageCacheSize),
    CFG_ITEM_INT(Conf, testing.mask_alpha_threshold, 8),
 
@@ -207,7 +208,7 @@
 MiscIpcExec(const char *params)
 {
    if (params)
-      execApplication(params, EXEC_SET_LANG);
+      execApplication(params, EXEC_SET_LANG | EXEC_SET_STARTUP_ID);
    else
       IpcPrintf("exec what?\n");
 }



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to