X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80f4c796428fb7fa5934a0b9305007f820b8eaac..c81394808bf7efd84e4294e44a9a9a7b7f6dd8a9:/src/x11/window.cpp diff --git a/src/x11/window.cpp b/src/x11/window.cpp index 7c2e5ae15b..3b569bf98f 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -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)