[Xfce4-commits] <thunar:master> Avoid requesting drag data if target is GDK_NONE (bug #5771).
Jannis Pohlmann
noreply at xfce.org
Sun Dec 20 14:44:01 CET 2009
Updating branch refs/heads/master
to 58568697a90844d98c7602902df8084297f19c1b (commit)
from eb6e6fc3fa46ff62874b254e5a616a74cf6cc9c4 (commit)
commit 58568697a90844d98c7602902df8084297f19c1b
Author: Jannis Pohlmann <jannis at xfce.org>
Date: Sun Dec 20 14:42:21 2009 +0100
Avoid requesting drag data if target is GDK_NONE (bug #5771).
Patch provided by k.blammo at gmail.com.
thunar/thunar-standard-view.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index 83139fc..8661861 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -2814,6 +2814,7 @@ thunar_standard_view_drag_motion (GtkWidget *view,
{
/* check if we can handle that drag data (yet?) */
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")))
{
/* determine the file for the given coordinates */
@@ -2857,7 +2858,8 @@ thunar_standard_view_drag_motion (GtkWidget *view,
else
{
/* 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 */
More information about the Xfce4-commits
mailing list