]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/dnd.cpp
Make status bar grip move to the left in RTL.
[wxWidgets.git] / src / gtk1 / dnd.cpp
index 29094ff240ad3daf28bf131a12391129ec88bb40..d24aa7a952c6e3a47136c207991d027fac8897cc 100644 (file)
 
 #ifndef WX_PRECOMP
     #include "wx/intl.h"
 
 #ifndef WX_PRECOMP
     #include "wx/intl.h"
+    #include "wx/log.h"
+    #include "wx/app.h"
+    #include "wx/utils.h"
+    #include "wx/window.h"
+    #include "wx/gdicmn.h"
 #endif
 
 #endif
 
-#include "wx/log.h"
-#include "wx/window.h"
-#include "wx/app.h"
-#include "wx/gdicmn.h"
-#include "wx/utils.h"
-
 #include "wx/gtk1/private.h"
 
 #include <gdk/gdkprivate.h>
 #include "wx/gtk1/private.h"
 
 #include <gdk/gdkprivate.h>
@@ -931,6 +930,14 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
 
     UnregisterWindow();
 
 
     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;
 }
 
     return m_retValue;
 }