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:
@@ -112,6 +112,13 @@ int wxDialog::ShowModal()
|
||||
return GetReturnCode();
|
||||
}
|
||||
|
||||
// release the mouse if it's currently captured as the window having it
|
||||
// will be disabled when this dialog is shown -- but will still keep the
|
||||
// capture making it impossible to do anything in the modal dialog itself
|
||||
wxWindow * const win = wxWindow::GetCapture();
|
||||
if ( win )
|
||||
win->GTKReleaseMouseAndNotify();
|
||||
|
||||
// use the apps top level window as parent if none given unless explicitly
|
||||
// forbidden
|
||||
if ( !GetParent() && !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT) )
|
||||
|
Reference in New Issue
Block a user