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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user