X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/670f9935630beb2123a5ca62894ae92a3f0efa4f..ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf:/src/gtk1/dnd.cpp?ds=sidebyside diff --git a/src/gtk1/dnd.cpp b/src/gtk1/dnd.cpp index 4da84ef7b0..d24aa7a952 100644 --- a/src/gtk1/dnd.cpp +++ b/src/gtk1/dnd.cpp @@ -18,12 +18,11 @@ #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 -#include "wx/window.h" -#include "wx/gdicmn.h" -#include "wx/utils.h" - #include "wx/gtk1/private.h" #include @@ -931,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; }