From: Vadim Zeitlin Date: Mon, 15 Jul 2013 15:14:49 +0000 (+0000) Subject: Fix wxGTK compilation in wxUSE_MENUS==0 case. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4ec2eca1e8c2829b34bfc95a10cc3c6ab4798314?ds=inline Fix wxGTK compilation in wxUSE_MENUS==0 case. Add missing check for it to wxWindow::DoFindFocus(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index e6d8aeba8a..d57145134e 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -2088,12 +2088,14 @@ void wxWindowGTK::GTKHandleUnrealize() wxWindow *wxWindowBase::DoFindFocus() { +#if wxUSE_MENUS // For compatibility with wxMSW, pretend that showing a popup menu doesn't // change the focus and that it remains on the window showing it, even // though the real focus does change in GTK. extern wxMenu *wxCurrentPopupMenu; if ( wxCurrentPopupMenu ) return wxCurrentPopupMenu->GetInvokingWindow(); +#endif // wxUSE_MENUS wxWindowGTK *focus = gs_pendingFocus ? gs_pendingFocus : gs_currentFocus; // the cast is necessary when we compile in wxUniversal mode