Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        ewins.c iconify.c x.c 


Log Message:
Fix some segv's in obscure situations.

===================================================================
RCS file: /cvs/e/e16/e/src/ewins.c,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -3 -r1.171 -r1.172
--- ewins.c     7 Aug 2006 20:26:05 -0000       1.171
+++ ewins.c     7 Aug 2006 23:26:36 -0000       1.172
@@ -1115,10 +1115,15 @@
 }
 
 static void
-EwinEventMap(EWin * ewin)
+EwinEventMap(EWin * ewin, XEvent * ev)
 {
-   int                 old_state = ewin->state.state;
+   int                 old_state;
 
+   /* Catch clients setting OR without proper withdrawal (just unmap/map) */
+   if (ev->xmap.override_redirect)
+      return;
+
+   old_state = ewin->state.state;
    ewin->state.state = EWIN_STATE_MAPPED;
 
    if (EventDebug(EDBUG_TYPE_EWINS))
@@ -2066,7 +2071,7 @@
        break;
 
      case MapNotify:
-       EwinEventMap(ewin);
+       EwinEventMap(ewin, ev);
        break;
 
      case EX_EVENT_REPARENT_GONE:
===================================================================
RCS file: /cvs/e/e16/e/src/iconify.c,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -3 -r1.216 -r1.217
--- iconify.c   7 Aug 2006 20:47:12 -0000       1.216
+++ iconify.c   7 Aug 2006 23:26:36 -0000       1.217
@@ -2738,9 +2738,7 @@
        EReparentWindow(win, VRoot.win, 0, 0);
        XRemoveFromSaveSet(disp, WinGetXwin(win));
      }
-#if 0                          /* Not needed when going to EUnregisterWindow */
    EventCallbackUnregister(win, 0, SystrayItemEvent, ib);
-#endif
    EUnregisterWindow(win);
 }
 
===================================================================
RCS file: /cvs/e/e16/e/src/x.c,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -3 -r1.146 -r1.147
--- x.c 4 Jun 2006 12:57:30 -0000       1.146
+++ x.c 7 Aug 2006 23:26:36 -0000       1.147
@@ -758,6 +758,14 @@
    if (!xid)
       return;
 
+   if (xid->cbl.lst)
+     {
+       if (EventDebug(1))
+          Eprintf("EUnregisterWindow(%#lx) Ignored (%d callbacks remain)\n",
+                  xid->xwin, xid->cbl.num);
+       return;
+     }
+
    EXidDel(xid);
 }
 



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to