]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/window.cpp
treat NULL extension properly in wxLoad/SaveFileSelector; don't crash if NULL ext...
[wxWidgets.git] / src / x11 / window.cpp
index b04be864ebc75da7a3ecc444b221de574eb2c387..9fa7e4d83fc598d9ac8478990fed9f005d8a85f4 100644 (file)
@@ -386,18 +386,15 @@ void wxWindowX11::SetFocus()
     
     if (wxWindowIsVisible(xwindow))
     {
-        XSetInputFocus( wxGlobalDisplay(), xwindow, RevertToParent, CurrentTime );
+        wxLogTrace( _T("focus"), _T("wxWindowX11::SetFocus: %s"), GetClassInfo()->GetClassName());
+        //        XSetInputFocus( wxGlobalDisplay(), xwindow, RevertToParent, CurrentTime );
+        XSetInputFocus( wxGlobalDisplay(), xwindow, RevertToNone, CurrentTime );
         m_needsInputFocus = FALSE;
     }
     else
     {
         m_needsInputFocus = TRUE;
     }
-#if 0
-    wxString msg;
-    msg.Printf("SetFocus: %s\n", GetClassInfo()->GetClassName());
-    printf(msg.c_str());
-#endif
 }
 
 // Get the window with the focus
@@ -1225,6 +1222,9 @@ void wxWindowX11::OnSysColourChanged(wxSysColourChangedEvent& event)
     }
 }
 
+// See handler for InFocus case in app.cpp for details.
+wxWindow* g_GettingFocus = NULL;
+
 void wxWindowX11::OnInternalIdle()
 {
     // Update invalidated regions.
@@ -1247,6 +1247,7 @@ void wxWindowX11::OnInternalIdle()
         // no point in trying again.
         m_needsInputFocus = FALSE;
     }
+    g_GettingFocus = NULL;
 }
 
 // ----------------------------------------------------------------------------