X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd05139a8023fd3e30476409fafbe04221c6d627..994453b843b007de6367fedbf4a49ac9d920c63c:/src/gtk/dnd.cpp diff --git a/src/gtk/dnd.cpp b/src/gtk/dnd.cpp index 2d234e0f92..7565e877ba 100644 --- a/src/gtk/dnd.cpp +++ b/src/gtk/dnd.cpp @@ -706,8 +706,7 @@ extern "C" { static gint gtk_dnd_window_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxDropSource *source ) { - if (g_isIdle) - wxapp_install_idle_handler(); + // don't need to install idle handler, its done from "event" signal source->GiveFeedback( ConvertFromGTK(source->m_dragContext->action) ); @@ -911,6 +910,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; }