! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Drag-and-drop behavior of Xfce desktop is different than Thunar
Status:
RESOLVED: FIXED
Severity:
trivial

Comments

Description fedorabugmail 2012-07-21 21:38:29 CEST
When dragging a file between the Desktop and a Thunar window the file is copied. When dragging a file between two Thunar windows or within the same Thunar window, the file is moved. Holding down shift allows a move to/from the desktop but does nothing for Thunar. I'd like to suggest that the Desktop follow the same convention Thunar does, or at least default to the same behavior.

In all cases the mouse cursor correctly indicates the operation that will be performed(arrow for move, plus for copy).
Comment 1 secipolla 2012-10-20 15:50:35 CEST
In my tests with xfdesktop 4.10.0-4.fc17 and thunar 1.4.0-1.fc17, dragging from thunar to desktop moves the file (when same owner just like thunar to thunar) but dragging from desktop to thunar copies it.
shift-dragging from desktop to thunar correctly moves the file but ctrl-dragging from thunar to desktop fails to copy the file (it's still moved).
Comment 2 Eric Koegel editbugs 2014-08-03 08:22:06 CEST
*** Bug 8644 has been marked as a duplicate of this bug. ***
Comment 3 ozfalcon 2015-02-17 04:46:43 CET
Some clarification on what's happening.

Bug #1
When unmodified dragging a file from the file manager to the desktop, The drag modifier shows the file is being copied (Small '+' symbol) but the file is moved.
ie. The drag modifier incorrectly shows copy instead of nothing (move).

Bug #2
When copy dragging (ctrl held down) a file from the file manager to the desktop, The drag modifier shows the file is being copied (Small '+' symbol) but the file is moved.
ie. The copy operation is not carried out, The file is moved instead.

Inconsistancy #1
Unmodified dragging from the desktop to a file manager copies the file.
Unmodified dragging from a file manager to the desktop moves the file.
ie. What default used (Copy or Move) is irrelevent, The issue here is both the operations should be consistant in their action of either Copy or Move.

Long standing issue
These problems are a barnacle for the unaware user, The issue may seem innocuous but has a real possiblility of people loosing files because they assume (As indicated) a copy operation has been carried out when infact a move operation has occured.
Comment 4 ozfalcon 2015-02-17 04:49:43 CET
Created attachment 5950 
Before the file dragged from file manager to desktop.
Comment 5 ozfalcon 2015-02-17 04:50:21 CET
Created attachment 5951 
After the file dragged from file manager to desktop.
Comment 6 ozfalcon 2015-02-17 04:51:21 CET
Comment on attachment 5950 
Before the file dragged from file manager to desktop.

Notice the drag modifier indicates the file is being copied (Small '+' symbol).
Comment 7 Thaddaeus Tintenfisch editbugs 2015-02-22 20:14:47 CET
Works fine here. Tested with xfdesktop 4.11.8 git.

The remaining oddity is the default drag&drop action when dragging a file from the desktop to a file manager.

-> thunar = copy
-> pcmanfm = move
-> nautilus = copy
Comment 8 Thaddaeus Tintenfisch editbugs 2015-02-23 00:13:11 CET
Created attachment 5981 
patch (thunar)

Thunar tries to access cached file information which does not exist when the user drags a file from desktop to thunar. As result, the copy action is determined to be the ideal drag and drop action.
The attached patch adds normal file info lookup as fallback for this case.
Comment 9 ozfalcon 2015-02-23 13:19:31 CET
After patching 1.6.5, I now recieve an error:
"The file transfer could not be performed" etc.
---> See attached image.

Reverting to an unpatched 1.6.5 works but still has the issues previously mentioned.

Note I am using xfdesktop4 v4.10.2-3 (Debian 8 testing [aka Jessie])
I'll try xdesktop4 v4.11.8 and see what sort of results are produced.
Comment 10 ozfalcon 2015-02-23 13:20:25 CET
Created attachment 5984 
Thunar 1.6.5 Patched Error
Comment 11 ozfalcon 2015-02-23 13:57:09 CET
Comment on attachment 5984 
Thunar 1.6.5 Patched Error

Disregard this image. Was due to a bad package installation.
Comment 12 ozfalcon 2015-02-23 14:02:23 CET
Correction:
The patch on Thunar 1.6.5 worked and the file moves when dragged from the desktop to the file manager as expected.

Dragging from the file manager to the desktop is unaffected by Thunar 1.6.5 + patch and exhibits the previously listed issues.
I'll comment on this once I have xfdesktop4 v4.11.8 installed.
Comment 13 ozfalcon 2015-02-28 23:54:20 CET
I have installed xfdesktop 4.11.8 and the problem is resolved.
ie. Drag from file manager now works correctly with copy, move & link.

The last inconsistancy is resolved with the Thunar patch by Thaddaeus Tintenfisch (attachment 5981 ).
ie. Drag from desktop to file manager is corrected to a move operation.

These are two separate bugs from two separate packages, xfdesktop 4.10 and below and Thunar without Thaddaeus's patch.

As the xfdesktop issue is resolved in 4.11.8, The only thing remaining is for 
Thaddaeus Tintenfisch patch (attachment 5981 ) to be submitted & included in Thunar.

Just to help anyone (With debian systems) the packages installed were:
Remove:
libxfce4ui-1-dev

Install:
xfce-keyboard-shortcuts_4.11.1-2_all.deb
libxfce4ui-1-0_4.11.1-2_i386.deb
libxfce4ui-common_4.11.1-2_all.deb
libxfce4ui-utils_4.11.1-2_i386.deb
xfdesktop4-data_4.11.8-1_all.deb
xfdesktop4_4.11.8-1_i386.deb

Note:
libxfce4ui-utils was probably not required, But I included it anyway.

Debian package links, Search for required packages:
https://packages.debian.org/search?keywords=xfdesktop4
Comment 14 Harald Judt editbugs 2015-03-06 18:40:26 CET
Thanks for the patch. Pushed to master: http://git.xfce.org/xfce/thunar/commit/?id=cdfdb7290abb270f5f98c93089c3b6e3c35859bc
Comment 15 ozfalcon 2015-03-10 01:39:58 CET
Information:
Thunar 1.6.6 was released prior to the patch being pushed to master.

So it looks like Thunar 1.6.7 will include this patch.

Great work and thanks.

Bug #9142

Reported by:
fedorabugmail
Reported on: 2012-07-21
Last modified on: 2015-03-10
Duplicates (1):
  • 8644 File dragged from Thunar to the desktop moves instead of copies

People

Assignee:
Xfce Bug Triage
CC List:
9 users

Version

Attachments

Before the file dragged from file manager to desktop. (106.64 KB, image/png)
2015-02-17 04:49 CET , ozfalcon
no flags
After the file dragged from file manager to desktop. (107.60 KB, image/png)
2015-02-17 04:50 CET , ozfalcon
no flags
patch (thunar) (996 bytes, patch)
2015-02-23 00:13 CET , Thaddaeus Tintenfisch
no flags
Thunar 1.6.5 Patched Error (166.60 KB, image/png)
2015-02-23 13:20 CET , ozfalcon
no flags

Additional information