File libfm-1.2.3-Reset-cached-data-if-drag-context-was-changed.patch of Package libfm

From 0c5b9e11ae83045acb3bdf6b08bbb101130f4ebe Mon Sep 17 00:00:00 2001
From: Andriy Grytsenko <andrej@rep.kiev.ua>
Date: Sat, 9 May 2015 20:17:20 +0300
Subject: [PATCH] FmDndDest: reset cached data if drag context was changed.

The context might change if motion changes something on target.
Therefore we should follow the change and re-request the data.
---
 src/gtk/fm-dnd-dest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gtk/fm-dnd-dest.c b/src/gtk/fm-dnd-dest.c
index 9d398ef..ddfda35 100644
--- a/src/gtk/fm-dnd-dest.c
+++ b/src/gtk/fm-dnd-dest.c
@@ -975,8 +975,9 @@ GdkDragAction fm_dnd_dest_get_default_action(FmDndDest* dd,
     /* we have no valid data, query it now */
     if(!dd->src_files || dd->context != drag_context)
     {
-        clear_src_cache(dd);
 query_sources:
+        if (dd->context != drag_context)
+            clear_src_cache(dd);
         action = 0;
         if(!dd->waiting_data) /* we're still waiting for "drag-data-received" signal */
         {
-- 
2.1.4

openSUSE Build Service is sponsored by