Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h extinitwin.c main.c session.c setup.c
Log Message:
Kill init win when restarting.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.412
retrieving revision 1.413
diff -u -3 -r1.412 -r1.413
--- E.h 23 Apr 2005 08:28:01 -0000 1.412
+++ E.h 23 Apr 2005 13:35:37 -0000 1.413
@@ -1707,7 +1707,9 @@
/* extinitwin.c */
Window ExtInitWinCreate(void);
-void ExtInitWinCheck(void);
+void ExtInitWinSet(Window win);
+Window ExtInitWinGet(void);
+void ExtInitWinKill(void);
/* file.c */
void Etmp(char *s);
@@ -2339,7 +2341,6 @@
extern VirtRoot VRoot;
extern EConf Conf;
extern EMode Mode;
-extern Window init_win_ext;
#define FILEPATH_LEN_MAX 4096
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/extinitwin.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- extinitwin.c 19 Mar 2005 16:40:02 -0000 1.7
+++ extinitwin.c 23 Apr 2005 13:35:37 -0000 1.8
@@ -218,3 +218,29 @@
/* We will never get here */
return None;
}
+
+static Window init_win_ext = None;
+
+void
+ExtInitWinSet(Window win)
+{
+ init_win_ext = win;
+}
+
+Window
+ExtInitWinGet(void)
+{
+ return init_win_ext;
+}
+
+void
+ExtInitWinKill(void)
+{
+ if (!disp || init_win_ext == None)
+ return;
+
+ if (EventDebug(EDBUG_TYPE_SESSION))
+ Eprintf("Kill init window %#lx\n", init_win_ext);
+ XKillClient(disp, init_win_ext);
+ init_win_ext = None;
+}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/main.c,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -3 -r1.124 -r1.125
--- main.c 20 Apr 2005 22:49:15 -0000 1.124
+++ main.c 23 Apr 2005 13:35:37 -0000 1.125
@@ -42,10 +42,6 @@
EConf Conf;
EMode Mode;
-#ifdef USE_EXT_INIT_WIN
-Window init_win_ext = None;
-#endif
-
static int EoptGet(int argc, char **argv);
static void EoptHelp(void);
static void ECheckEprog(const char *name);
@@ -207,7 +203,7 @@
break;
#ifdef USE_EXT_INIT_WIN
case 'X':
- init_win_ext = strtoul(eoptarg, NULL, 0);
+ ExtInitWinSet(strtoul(eoptarg, NULL, 0));
Mode.wm.restart = 1;
break;
#endif
@@ -267,13 +263,7 @@
#ifdef USE_EXT_INIT_WIN
/* Kill the E process owning the "init window" */
- if (init_win_ext)
- {
- if (EventDebug(EDBUG_TYPE_SESSION))
- Eprintf("Kill init window %#lx\n", init_win_ext);
- XKillClient(disp, init_win_ext);
- init_win_ext = 0;
- }
+ ExtInitWinKill();
#endif
/* sync just to make sure */
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/session.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -3 -r1.96 -r1.97
--- session.c 7 Apr 2005 16:38:56 -0000 1.96
+++ session.c 23 Apr 2005 13:35:37 -0000 1.97
@@ -838,10 +838,7 @@
if (disp)
{
XSelectInput(disp, VRoot.win, 0);
-#if 0 /* FIXME */
- if (Mode.wm.master && init_win_ext)
- XKillClient(disp, init_win_ext);
-#endif
+ ExtInitWinKill();
XSync(disp, False);
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/setup.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -3 -r1.158 -r1.159
--- setup.c 17 Apr 2005 13:58:08 -0000 1.158
+++ setup.c 23 Apr 2005 13:35:37 -0000 1.159
@@ -35,11 +35,14 @@
static Window *wlist = NULL;
static unsigned int num = 0;
- Window par;
- Window rt;
+ Window par, rt;
XWindowAttributes attr;
unsigned int i;
+#ifdef USE_EXT_INIT_WIN
+ Window init_win = ExtInitWinGet();
+#endif
+
switch (start)
{
case 0:
@@ -48,15 +51,15 @@
for (i = 0; i < num; i++)
{
#ifdef USE_EXT_INIT_WIN
- if ((init_win_ext) && (init_win_ext == wlist[i]))
+ if (init_win == wlist[i])
{
- wlist[i] = 0;
+ wlist[i] = None;
continue;
}
#endif
XGetWindowAttributes(disp, wlist[i], &attr);
if (attr.map_state == IsUnmapped)
- wlist[i] = 0;
+ wlist[i] = None;
else
XUnmapWindow(disp, wlist[i]);
}
@@ -80,8 +83,8 @@
if (attr.override_redirect)
{
#ifdef USE_EXT_INIT_WIN
- if (init_win_ext)
- XRaiseWindow(disp, init_win_ext);
+ if (init_win)
+ XRaiseWindow(disp, init_win);
#endif
XMapWindow(disp, wlist[i]);
}
@@ -173,7 +176,7 @@
Mode.wm.master = 0;
Mode.wm.pid = getpid();
VRoot.scr = i;
- init_win_ext = None;
+ ExtInitWinSet(None);
#ifdef SIGSTOP
kill(getpid(), SIGSTOP);
#endif
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs