From: Carlos Garcia Campos Date: Wed, 13 May 2009 12:47:33 +0000 (+0200) Subject: [shell] Abort dnd operations originated in the same Evince window X-Git-Tag: EVINCE_2_26_2~5 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=bd94bf86483320832a36af937a97c3fa8e4cbb21;p=evince.git [shell] Abort dnd operations originated in the same Evince window Fixes bug #582077 --- diff --git a/shell/ev-window.c b/shell/ev-window.c index a9578e48..63f89c77 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -4747,10 +4747,17 @@ ev_window_drag_data_received (GtkWidget *widget, guint time) { - EvWindow *window = EV_WINDOW (widget); - gchar **uris; - gint i = 0; - GSList *uri_list = NULL; + EvWindow *window = EV_WINDOW (widget); + gchar **uris; + gint i = 0; + GSList *uri_list = NULL; + GtkWidget *source; + + source = gtk_drag_get_source_widget (context); + if (source && widget == gtk_widget_get_toplevel (source)) { + gtk_drag_finish (context, FALSE, FALSE, time); + return; + } uris = gtk_selection_data_get_uris (selection_data); if (!uris) {