Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dragging item from archiver onto pcmanfm's side pane freezes the archiver #45

Open
CasperVector opened this issue Mar 6, 2019 · 4 comments

Comments

@CasperVector
Copy link

CasperVector commented Mar 6, 2019

  • Open pcmanfm with the side pane enabled, open a compressed file with engrampa, and drag an item from the compressed file across the side pane.
  • As soon as the mouse pointer reaches the side pane, even before the item is dropped, an error dialog shows up; meanwhile, the shape of the pointer changes from the normal "hand" (if originally outside of the file list area in pcmanfm) or the "hand with plus sign" (if originally inside the file list) to the "hand with chain sign".
  • The desktop becomes unresponsive to mouse clicks and most keystrokes, until engrampa is killed, after which the pointer shape returns normal. Similar symptom also happens with xarchiver, but not with thunar.
  • The issue can be worked around by reverting the changes in 1d7738c; actually, disabling the if(!dd->waiting_data) { ... } branch when either dest or dest_path is zero prevents the symptom from occuring. However, I am totally unfamiliar with the drag-and-drop protocols, and therefore unsure whether this fixes the root cause of this issue and does not cause undesirable side effects.
@CasperVector
Copy link
Author

A patch which seems most unintrusive to me:

diff -ur libfm-1.3.2/src/gtk/fm-dnd-dest.c libfm-1.3.2/src/gtk/fm-dnd-dest.c
--- libfm-1.3.2/src/gtk/fm-dnd-dest.c	2022-10-31 01:05:49.931057670 +0800
+++ libfm-1.3.2/src/gtk/fm-dnd-dest.c	2022-10-31 01:07:27.667579011 +0800
@@ -979,7 +979,7 @@
         if (dd->context != drag_context)
             clear_src_cache(dd);
         action = 0;
-        if(!dd->waiting_data) /* we're still waiting for "drag-data-received" signal */
+        if(dest_path && !dd->waiting_data) /* we're still waiting for "drag-data-received" signal */
         {
             /* retrieve the source files */
             gtk_drag_get_data(dd->widget, drag_context, target, time(NULL));

@CasperVector
Copy link
Author

Sorry, incomplete check...

diff -ur libfm-1.3.2/src/gtk/fm-dnd-dest.c libfm-1.3.2/src/gtk/fm-dnd-dest.c
--- libfm-1.3.2/src/gtk/fm-dnd-dest.c	2022-10-31 01:05:49.931057670 +0800
+++ libfm-1.3.2/src/gtk/fm-dnd-dest.c	2022-10-31 01:07:27.667579011 +0800
@@ -979,7 +979,7 @@
         if (dd->context != drag_context)
             clear_src_cache(dd);
         action = 0;
-        if(!dd->waiting_data) /* we're still waiting for "drag-data-received" signal */
+        if(dest && dest_path && !dd->waiting_data) /* we're still waiting for "drag-data-received" signal */
         {
             /* retrieve the source files */
             gtk_drag_get_data(dd->widget, drag_context, target, time(NULL));

@dirkf
Copy link

dirkf commented Mar 17, 2024

Did you build and test this? It doesn't seem to have a PR yet.

@cwendling
Copy link

@CasperVector it probably will work, but doesn't that just effectively revert 1d7738c? I'm not sure the reason behind that commit, and it's from 2012, but it sill might be interesting to see why that was done like so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants