GNOME Bugzilla – Bug 768013
[Wayland] Drag and drop copies emails instead of moving them
Last modified: 2016-06-30 15:05:44 UTC
Step to reproduce: 1. open evolution 2. select any email message 3. drag it to another folder What happens: Action defaults to copying the message Expected behavior: Dnd should default to copying the message Affected versions: evolution-3.20.3-1.fc24.x86_64 gtk3-3.20.6-1.fc24.x86_64 See also: This issue was part of bug #755625 (see comment 16)
(In reply to Christian Stadelmann from comment #0) > Expected behavior: > Dnd should default to copying the message I think you mean _moving_
(In reply to Leo from comment #1) > (In reply to Christian Stadelmann from comment #0) > > Expected behavior: > > Dnd should default to copying the message > > I think you mean _moving_ Yes, you are right. I meant dragging emails in evolution should default to moving the message.
It seems that the problem is with the order of the drag/drop targets, because it makes the difference between Wayland and X11. While X11 uses g_list_append() [1], the Wayland uses g_list_prepend() [2]. Both are advertising targets "x-uid-list" and "text/uri-list", only the Wayland in the opposite order. The evolution picks the first known target and acts based on it. The "x-uid-list" changes the default operation to Move, when the rest is kept as suggested, thus usually Copy. I agree that the Evolution code should be more flexible, thus I'm not moving this to the gtk+, but I'll rather correct the evolution code (it can be that the other things will be reported later, if any, when I overlook it/them here). [1] https://git.gnome.org/browse/gtk+/tree/gdk/x11/gdkdnd-x11.c#n1749 [2] https://git.gnome.org/browse/gtk+/tree/gdk/wayland/gdkselection-wayland.c#n370
I looked around the code and this place seems to be the only affected. If you find more, please let me know, I checked it only by the code reading. Created commit a665180 in evo master (3.21.4+) Created commit e5c2125 in evo gnome-3-20 (3.20.4+)
*** Bug 768101 has been marked as a duplicate of this bug. ***