]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/window.cpp
reverting part of r58797, otherwise wxClientDC get no graphics context at all
[wxWidgets.git] / src / x11 / window.cpp
index e9692b860084042ad59311d8c4f0e58b2812e38c..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 );