Commit 58568697 authored by Jannis Pohlmann's avatar Jannis Pohlmann

Avoid requesting drag data if target is GDK_NONE (bug #5771).

Patch provided by k.blammo@gmail.com.
parent eb6e6fc3
...@@ -2814,6 +2814,7 @@ thunar_standard_view_drag_motion (GtkWidget *view, ...@@ -2814,6 +2814,7 @@ thunar_standard_view_drag_motion (GtkWidget *view,
{ {
/* check if we can handle that drag data (yet?) */ /* check if we can handle that drag data (yet?) */
target = gtk_drag_dest_find_target (view, context, NULL); target = gtk_drag_dest_find_target (view, context, NULL);
if ((target == gdk_atom_intern_static_string ("XdndDirectSave0")) || (target == gdk_atom_intern_static_string ("_NETSCAPE_URL"))) if ((target == gdk_atom_intern_static_string ("XdndDirectSave0")) || (target == gdk_atom_intern_static_string ("_NETSCAPE_URL")))
{ {
/* determine the file for the given coordinates */ /* determine the file for the given coordinates */
...@@ -2857,7 +2858,8 @@ thunar_standard_view_drag_motion (GtkWidget *view, ...@@ -2857,7 +2858,8 @@ thunar_standard_view_drag_motion (GtkWidget *view,
else else
{ {
/* request the drag data from the source */ /* request the drag data from the source */
gtk_drag_get_data (view, context, target, timestamp); if (target != GDK_NONE)
gtk_drag_get_data (view, context, target, timestamp);
} }
/* tell Gdk whether we can drop here */ /* tell Gdk whether we can drop here */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment