relinquish the mouse capture when a dialog is about to be made modal to ensure that the mouse can be used in it (patch 1754648)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-08-15 21:01:30 +00:00
parent b1294ada8e
commit 7738af5957
4 changed files with 54 additions and 0 deletions

View File

@@ -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();