Skip to content

wayland/data-device: Prefer copy when shift+control used in dnd

X11 provides the ability to create a link by holding CTRL+SHIFT during a DnD operation.

In Wayland, the modifiers CTRL and SHIFT are checked independently to either use the MOVE or COPY action. Given that COPY is non-destructive, prefer COPY over MOVE when both control and shift are used.

Furthermore, the Wayland protocol states "If no modifiers are pressed, the first match (in bit order) will be used" (i.e. COPY before MOVE). This change would be more consistent with that default behavior.

This has been a problem in Nautilus where users are mistakenly moving data nautilus#1302 (moved)

Edited by Corey Berla

Merge request reports