X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b4651028a315ed881858165675667fdaef58d6c..e4606ed9d0d0fb3c6b11e97185a66139ff703c35:/src/common/popupcmn.cpp diff --git a/src/common/popupcmn.cpp b/src/common/popupcmn.cpp index d6319df904..36382fca0a 100644 --- a/src/common/popupcmn.cpp +++ b/src/common/popupcmn.cpp @@ -187,10 +187,17 @@ void wxPopupTransientWindow::Popup(wxWindow *winFocus) m_child = this; } + // we can't capture mouse before the window is shown in wxGTL +#ifdef __WXGTK__ + Show(); +#endif + m_child->CaptureMouse(); m_child->PushEventHandler(new wxPopupWindowHandler(this)); +#ifndef __WXGTK__ Show(); +#endif m_focus = winFocus ? winFocus : this; m_focus->PushEventHandler(new wxPopupFocusHandler(this));