After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 768013 - [Wayland] Drag and drop copies emails instead of moving them
[Wayland] Drag and drop copies emails instead of moving them
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.20.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
: 768101 (view as bug list)
Depends on:
Blocks: WaylandRelated
 
 
Reported: 2016-06-24 15:47 UTC by Christian Stadelmann
Modified: 2016-06-30 15:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Stadelmann 2016-06-24 15:47:24 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)
Comment 1 Leo 2016-06-24 19:26:42 UTC
(In reply to Christian Stadelmann from comment #0)
> Expected behavior:
> Dnd should default to copying the message

I think you mean _moving_
Comment 2 Christian Stadelmann 2016-06-24 21:45:50 UTC
(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.
Comment 3 Milan Crha 2016-06-29 22:36:08 UTC
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
Comment 4 Milan Crha 2016-06-30 10:36:44 UTC
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+)
Comment 5 Milan Crha 2016-06-30 15:05:44 UTC
*** Bug 768101 has been marked as a duplicate of this bug. ***