fix releasing mouse capture before showing modal dialog, see #16647

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2014-11-14 18:56:37 +00:00
parent 2f3969724b
commit 00cc0233f6
4 changed files with 24 additions and 13 deletions

View File

@@ -4840,10 +4840,16 @@ void wxWindowGTK::DoReleaseMouse()
void wxWindowGTK::GTKReleaseMouseAndNotify()
{
ReleaseMouse();
wxMouseCaptureLostEvent evt(GetId());
evt.SetEventObject( this );
HandleWindowEvent( evt );
GdkDisplay* display = gtk_widget_get_display(m_widget);
#ifdef __WXGTK3__
GdkDeviceManager* manager = gdk_display_get_device_manager(display);
GdkDevice* device = gdk_device_manager_get_client_pointer(manager);
gdk_device_ungrab(device, unsigned(GDK_CURRENT_TIME));
#else
gdk_display_pointer_ungrab(display, unsigned(GDK_CURRENT_TIME));
#endif
g_captureWindow = NULL;
NotifyCaptureLost();
}
/* static */