]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/window.cpp
Make wxSpinCtrlGeneric usable as wxDVC editor control.
[wxWidgets.git] / src / x11 / window.cpp
index 7c2e5ae15b16978a61923ae1049b863f8cca598d..3b569bf98f27e6b2a487cd1b2f5d2b77228485cc 100644 (file)
@@ -397,7 +397,10 @@ void wxWindowX11::SetFocus()
     }
 #endif
 
-    if (wxWindowIsVisible(xwindow))
+    XWindowAttributes wa;
+    XGetWindowAttributes(wxGlobalDisplay(), xwindow, &wa);
+
+    if (wa.map_state == IsViewable)
     {
         wxLogTrace( wxT("focus"), wxT("wxWindowX11::SetFocus: %s"), GetClassInfo()->GetClassName());
         //        XSetInputFocus( wxGlobalDisplay(), xwindow, RevertToParent, CurrentTime );
@@ -1318,10 +1321,7 @@ void wxWindowX11::OnInternalIdle()
     // Update invalidated regions.
     Update();
 
-    // This calls the UI-update mechanism (querying windows for
-    // menu/toolbar/control state information)
-    if (wxUpdateUIEvent::CanUpdate((wxWindow*) this) && IsShownOnScreen())
-        UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
+    wxWindowBase::OnInternalIdle();
 
     // Set the input focus if couldn't do it before
     if (m_needsInputFocus)