Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        ewins.c 


Log Message:
Fix clients being destroyed after MapRequest but before reparent.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ewins.c     3 Jan 2005 23:42:39 -0000       1.6
+++ ewins.c     4 Jan 2005 22:13:51 -0000       1.7
@@ -515,7 +515,6 @@
 
    EDBUG(4, "Adopt");
 
-   ecore_x_grab();
    ewin = EwinCreate(win, EWIN_TYPE_NORMAL);
 
    ICCCM_AdoptStart(ewin);
@@ -543,8 +542,6 @@
    EwinGetGeometry(ewin);
    EwinEventsConfigure(ewin, 1);
 
-   ecore_x_ungrab();
-
    if (ewin->shaded)
       EwinInstantShade(ewin, 1);
 
@@ -561,7 +558,6 @@
 
    EDBUG(4, "AdoptInternal");
 
-   ecore_x_grab();
    ewin = EwinCreate(win, type);
 
    ewin->border = border;
@@ -623,8 +619,6 @@
    EwinGetGeometry(ewin);
    EwinEventsConfigure(ewin, 1);
 
-   ecore_x_ungrab();
-
    if (ewin->shaded)
       EwinInstantShade(ewin, 1);
 
@@ -932,6 +926,7 @@
      }
 
    EwinDetermineArea(ewin);
+
    ecore_x_ungrab();
 
    EDBUG_RETURN_;
@@ -953,6 +948,9 @@
        if (!b)
           b = FindItem("DEFAULT", 0, LIST_FINDBY_NAME, LIST_TYPE_BORDER);
      }
+
+   ecore_x_grab();
+
    ewin = AdoptInternal(win, b, type);
 
    EoSetDesk(ewin, EoGetDesk(ewin));
@@ -1954,6 +1952,8 @@
 static void
 EwinHandleEventsRoot(XEvent * ev, void *prm __UNUSED__)
 {
+   EWin               *ewin;
+
    switch (ev->type)
      {
      case EnterNotify:
@@ -1988,6 +1988,14 @@
        EwinEventCirculateRequest(NULL, ev);
        break;
 
+     case DestroyNotify:
+       /* Catch clients destroyed after MapRequest but before being reparented 
*/
+       ewin = FindItem(NULL, ev->xdestroywindow.window, LIST_FINDBY_ID,
+                       LIST_TYPE_EWIN);
+       if (ewin)
+          EwinEventDestroy(ewin);
+       break;
+
      default:
 #if 0
        Eprintf("EwinHandleEventsRoot: type=%2d win=%#lx\n",




-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to