X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1aeae3f7d419ee8ec295988a72d1091265cd268c..37788684ba0dfe52d3b4f67e5c2dae521893bfff:/src/gtk/dnd.cpp diff --git a/src/gtk/dnd.cpp b/src/gtk/dnd.cpp index 0ce223efb4..08adfeb885 100644 --- a/src/gtk/dnd.cpp +++ b/src/gtk/dnd.cpp @@ -148,7 +148,7 @@ static wxDragResult ConvertFromGTK(long action) case GDK_ACTION_MOVE: return wxDragMove; } - + return wxDragNone; } @@ -218,7 +218,7 @@ static gboolean target_drag_motion( GtkWidget *WXUNUSED(widget), wxDragResult suggested_action = drop_target->GTKFigureOutSuggestedAction(); wxDragResult result = wxDragNone; - + if (drop_target->m_firstMotion) { // the first "drag_motion" event substitutes a "drag_enter" event @@ -237,18 +237,18 @@ static gboolean target_drag_motion( GtkWidget *WXUNUSED(widget), result_action = GDK_ACTION_LINK; else result_action = GDK_ACTION_MOVE; - + // is result action actually supported bool ret ((result_action != GDK_ACTION_DEFAULT) && (context->actions & result_action)); - + if (ret) gdk_drag_status( context, result_action, time ); // after this, invalidate the drop_target's GdkDragContext drop_target->GTKSetDragContext( NULL ); - // this has to be done because GDK has no "drag_enter" event + // this has to be done because GDK has no "drag_enter" event drop_target->m_firstMotion = false; return ret; @@ -281,14 +281,14 @@ static gboolean target_drag_drop( GtkWidget *widget, { // cancel the whole thing gtk_drag_finish( context, - FALSE, // no success + FALSE, // no success FALSE, // don't delete data on dropping side time ); - + drop_target->GTKSetDragContext( NULL ); - + drop_target->m_firstMotion = true; - + return FALSE; } @@ -436,7 +436,7 @@ wxDragResult wxDropTarget::GTKFigureOutSuggestedAction() { if (!m_dragContext) return wxDragError; - + // GTK+ always supposes that we want to copy the data by default while we // might want to move it, so examine not only suggested_action - which is // only good if we don't have our own preferences - but also the actions @@ -857,6 +857,9 @@ wxDragResult wxDropSource::DoDragDrop(int flags) while (m_waiting) gtk_main_iteration(); + g_signal_handlers_disconnect_by_func (m_iconWindow, + (gpointer) gtk_dnd_window_configure_callback, this); + return m_retValue; }