]> git.saurik.com Git - wxWidgets.git/commitdiff
Made sure events for defunct windows are no longer handled.
authorJulian Smart <julian@anthemion.co.uk>
Mon, 11 Feb 2002 13:27:41 +0000 (13:27 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 11 Feb 2002 13:27:41 +0000 (13:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/x11/app.cpp

index b0cfa2c7390b3b573f5585683caf1269d894ed93..5e206eea7da29fd570d5a9360710a934d537452a 100644 (file)
@@ -293,8 +293,17 @@ void wxApp::ProcessXEvent(WXEvent* _event)
     // Find the first wxWindow that corresponds to this event window
     // TODO: may need to translate coordinates from actualWindow
     // to window, if the receiving window != wxWindow window
-    while (window && !(win = wxGetWindowFromTable(window)))
-        window = wxGetWindowParent(window);
+    //    while (window && !(win = wxGetWindowFromTable(window)))
+    //        window = wxGetWindowParent(window);
+
+    // Because we're receiving events after a window
+    // has been destroyed, assume a 1:1 match between
+    // Window and wxWindow, so if it's not in the table,
+    // it must have been destroyed.
+
+    win = wxGetWindowFromTable(window);
+    if (!win)
+       return;
 
     switch (event->type)
     {