Skip to content

Feature: Prepare dragging files to other apps through Uno's X11 drag source - #197

Merged
MemerGamer merged 2 commits into
mainfrom
linux/x11-dnd-source
Oct 15, 2026
Merged

MemerGamer merged 2 commits into
mainfrom
linux/x11-dnd-source

Conversation

@MemerGamer

@MemerGamer MemerGamer commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Resolved / Related Issues

MemerGamer/uno wayland/host-x11dnd (now 4bde03f9c8) gives Uno's X11 host its own XDND v5 drag source, modelled on the Wayland host's outgoing drag. It shows a drag icon (the DragView snapshot) and copy, move, link and no-drop cursors outside the window, handles Escape and Shift/Ctrl, and routes drags that come back into the window to Uno. With it, LinuxFiles only puts the file list into the drag's DataPackage on X11 too, the same as on Wayland.

The released Uno packages (6.7.135-wayland.6) do not have the new source yet, so this PR leaves the switch ready instead of turning it on:

  • FilesUnoX11NativeDrag (Directory.Packages.props, default false) defines UNO_X11_NATIVE_DRAG. Set it to true in the same change that bumps UnoWaylandVersion to a package containing the Uno branch.
  • While it is off, X11 keeps using the Files X11 selection-host drag. That old source and DesktopRuntimeGuards stay as the fallback for older packages.
  • docs/linux-port/dnd.md documents the switch and what was verified.

The same Uno branch also fixes drops from Wayland-native apps (Dolphin) into LinuxFiles under XWayland. That was broken in alpha7 as well: Uno's selection readers threw away the window's XDND messages while waiting for data, and KWin then stopped answering drags to the window. UNO_X11_DND_LOG=<file> writes an XDND trace for real-desktop diagnosis.

Steps used to test these changes

All runs used a LinuxFiles build with -p:FilesUnoX11NativeDrag=true and the branch's Uno.UI.Runtime.Skia.X11.dll overlaid. Everything ran in private sessions with throwaway homes.

  1. Private Xvfb with a GTK3 drop target: copy delivered text/uri-list. Shift gave a move. Escape sent only a leave. A rejecting target showed the no-drop cursor and got no drop. Dropping onto a folder in the same window moved the file. Dragging out to the target and back into a folder also moved it.
  2. Nested KWin with XWayland and Wayland-native Dolphin (X11 to Wayland bridge): the drop menu's Copy Here copied the file, and Shift moved it. Escape cancelled without a later stray drop. Out and back into a folder worked, including mouse-wheel clicks during the drag.
  3. Dolphin to LinuxFiles in a fresh nested KWin: drops into the list and onto a folder, repeated drops, and Escape. The alpha7 tarball and the earlier branch build reproduce the user's failure: XdndDrop gets no XdndFinished.
  4. Uno unit tests 194/0 (including new X11 drag tests). Code review by OpenAI Codex; its six findings were fixed on the Uno branch.

Not yet tested on a real desktop session, fractional scaling, or with multiple monitors.

This change was developed with AI assistance (Claude, reviewed by OpenAI Codex).

🤖 Generated with Claude Code

https://claude.ai/code/session_01BTZhMsNyJ6k4VC68CNb5WU

MemerGamer and others added 2 commits October 15, 2026 20:39
Uno's X11 host gains an XDND source on MemerGamer/uno wayland/host-x11dnd
(drag icon, cursors, Escape, own-window routing, KWin XWayland bridge).
With FilesUnoX11NativeDrag=true Files puts the file list into the drag's
DataPackage on X11 too, as on Wayland, and stops starting its own X11
drag source. The switch stays off until a released UnoWaylandVersion
contains the branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BTZhMsNyJ6k4VC68CNb5WU
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BTZhMsNyJ6k4VC68CNb5WU
@MemerGamer
MemerGamer merged commit 9a24095 into main Oct 15, 2026
2 checks passed
@MemerGamer
MemerGamer deleted the linux/x11-dnd-source branch October 15, 2026 20:12
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

Successfully merging this pull request may close these issues.

1 participant