]> git.saurik.com Git - wxWidgets.git/commitdiff
work around drag and drop freeze (bug 1080588)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 5 Sep 2006 17:48:55 +0000 (17:48 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 5 Sep 2006 17:48:55 +0000 (17:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk1/dnd.cpp

index 34f533e5c759b084ddc143f139efa9312c580d76..d24aa7a952c6e3a47136c207991d027fac8897cc 100644 (file)
@@ -930,6 +930,14 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
 
     UnregisterWindow();
 
+    // this shouldn't be needed but somehow, sometimes, without this the cursor
+    // stays grabbed even when the DND operation ends and the application
+    // becomes unresponsive and has to be killed resulting in loss of all
+    // unsaved data, so while this fix is ugly it's still better than
+    // alternative
+    if ( gdk_pointer_is_grabbed() )
+        gdk_pointer_ungrab(GDK_CURRENT_TIME);
+
     return m_retValue;
 }