X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1878d1ecef055fec59198b499426c22943d40734..35bb3cb155917b4287fb2a3841bea22919a3d499:/src/gtk/msgdlg.cpp diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp index 267d54db07..0b4dd87c22 100644 --- a/src/gtk/msgdlg.cpp +++ b/src/gtk/msgdlg.cpp @@ -16,7 +16,7 @@ #pragma hdrstop #endif -#if wxUSE_MSGDLG && defined(__WXGTK20__) && !defined(__WXGPE__) +#if wxUSE_MSGDLG && !defined(__WXGPE__) #include "wx/msgdlg.h" @@ -137,6 +137,12 @@ void wxMessageDialog::GTKCreateMsgDialog() int wxMessageDialog::ShowModal() { + // break the mouse capture as it would interfere with modal dialog (see + // wxDialog::ShowModal) + wxWindow * const win = wxWindow::GetCapture(); + if ( win ) + win->GTKReleaseMouseAndNotify(); + if ( !m_widget ) { GTKCreateMsgDialog(); @@ -173,4 +179,4 @@ int wxMessageDialog::ShowModal() } -#endif // wxUSE_MSGDLG && defined(__WXGTK20__) && !defined(__WXGPE__) +#endif // wxUSE_MSGDLG && !defined(__WXGPE__)