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

@@ -295,6 +295,15 @@ bool wxGUIAppTraits::ShowAssertDialog(const wxString& msg)
GtkWidget *dialog = gtk_assert_dialog_new();
gtk_assert_dialog_set_message(GTK_ASSERT_DIALOG(dialog), msg.mb_str());
GdkDisplay* display = gtk_widget_get_display(dialog);
#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
#if wxUSE_STACKWALKER
// save the current stack ow...
StackDump dump(GTK_ASSERT_DIALOG(dialog));