X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/35ff90a0b30bf24fcb9478a3c43143c124bbff46..d1da887276915d7b83dc7beff43bbe0deea35939:/src/gtk1/toplevel.cpp?ds=sidebyside diff --git a/src/gtk1/toplevel.cpp b/src/gtk1/toplevel.cpp index d5fff696dd..6aec1647c8 100644 --- a/src/gtk1/toplevel.cpp +++ b/src/gtk1/toplevel.cpp @@ -1067,13 +1067,18 @@ bool wxTopLevelWindowGTK::SetShape(const wxRegion& region) return do_shape_combine_region(window, region); } -bool wxTopLevelWindowGTK::HasFocus() +bool wxTopLevelWindowGTK::IsActive() { #ifdef __WXGTK20__ + // Order the conditions like this so we don't + // have to decide how to include version for GTK+ 1 versus 2 +#if GTK_CHECK_VERSION(2,2,0) return GTK_WINDOW( m_widget )->has_toplevel_focus; #else - return ( wxGetTopLevelParent(FindFocus()) = this ); + return wxTopLevelWindowBase::IsActive(); +#endif +#else + return wxTopLevelWindowBase::IsActive(); #endif } -// vi:sts=4:sw=4:et