Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: extinitwin.c Log Message: Quit init window without causing X errors during restart. =================================================================== RCS file: /cvs/e/e16/e/src/extinitwin.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -3 -r1.30 -r1.31 --- extinitwin.c 5 Jun 2008 08:55:20 -0000 1.30 +++ extinitwin.c 16 Jun 2008 21:20:42 -0000 1.31 @@ -25,7 +25,6 @@ #include "e16-ecore_hints.h" #include "eimage.h" #include "xwin.h" -#include <sys/time.h> #include <X11/extensions/shape.h> static Window @@ -85,11 +84,11 @@ Window w2, ww; char s[1024]; EImage *im; - struct timeval tv; int dd, x, y, w, h; unsigned int mm; Cursor cs = 0; XColor cl; + XWindowAttributes xwa; w2 = XCreateWindow(disp, win, 0, 0, 32, 32, 0, CopyFromParent, InputOutput, CopyFromParent, @@ -117,6 +116,11 @@ if (i > 12) i = 1; + /* If we get unmapped we are done */ + XGetWindowAttributes(disp, win, &xwa); + if (xwa.map_state == IsUnmapped) + break; + Esnprintf(s, sizeof(s), "pix/wait%i.png", i); if (EDebug(EDBUG_TYPE_SESSION) > 1) Eprintf("ExtInitWinCreate - child %s\n", s); @@ -136,9 +140,7 @@ XMapWindow(disp, w2); EImageFree(im); } - tv.tv_sec = 0; - tv.tv_usec = 50000; - select(0, NULL, NULL, NULL, &tv); + usleep(50000); ESync(0); } } @@ -229,6 +231,6 @@ if (EDebug(EDBUG_TYPE_SESSION)) Eprintf("Kill init window %#lx\n", init_win_ext); - XKillClient(disp, init_win_ext); + XUnmapWindow(disp, init_win_ext); init_win_ext = None; } ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs