From 3034af407a85d53f918f381d82aa4f25357f0b92 Mon Sep 17 00:00:00 2001 From: astar76 Date: Thu, 19 Nov 2026 00:51:53 -0600 Subject: [PATCH] S031: native drag and drop and file clipboard on X11 XDND v5 source and target on an own x11rb connection (proxy window via XdndProxy), CLIPBOARD owner and reader. Wayland and X11 share one Backend trait. examples/xdnd_probe drives both directions under Xvfb. Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 1 + Cargo.lock | 1 + .../S031-native-dnd-x11.md | 10 +- Plans/INDEX.md | 2 +- crates/tunal/Cargo.toml | 5 + crates/tunal/examples/xdnd_probe.rs | 247 ++++++++ crates/tunal/src/native/mod.rs | 68 +- crates/tunal/src/native/wayland.rs | 100 ++- crates/tunal/src/native/x11.rs | 594 ++++++++++++++++++ docs/PROGRESS.md | 9 + 10 files changed, 959 insertions(+), 78 deletions(-) create mode 100644 crates/tunal/examples/xdnd_probe.rs create mode 100644 crates/tunal/src/native/x11.rs diff --git a/CLAUDE.md b/CLAUDE.md index 90efcf7..3348526 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -91,6 +91,7 @@ Never modify: `PROMPT.md` (the user's brief), the user's other projects under `~ | `cargo run -p tunal -- --gallery --page menu\|dialog --screenshot [--dark] --size 960x640` | open menu + submenu + two toasts, or dialog + indeterminate toast, over a stand-in folder | S005 | | `TUNAL_SETTINGS=<0-5> cargo run -p tunal -- --screenshot --size 1000x700` (`XDG_CONFIG_HOME=`) | settings dialog page over a folder | S013 | | `TUNAL_DRAG=x1,y1,x2,y2[,hold] TUNAL_REDUCED_MOTION=1 cargo run -p tunal -- --screenshot --size 1200x760` (`XDG_CONFIG_HOME=`) | drags between window points and drops (drop menu) or holds (glow + drag image) before the frame | S014 | +| `Xvfb :97 &` then `env -u WAYLAND_DISPLAY DISPLAY=:97 target/debug/tunal &` and `DISPLAY=:97 target/debug/examples/xdnd_probe x1 y1 x2 y2` (or `in x y `) | X11 native DnD: fake XTEST drag out of the window onto a probe target, or a probe source dropping into the app; Xvfb only | S031 | | `TUNAL_APPEARANCE=1 XDG_CONFIG_HOME= cargo run -p tunal -- --screenshot --size 1000x760` | folder appearance dialog for `` (theme icons looked up at once); `cargo run -p tunal-dirmeta --example roundtrip -- ` sets `Icon` in `/.directory` and prints the old values | S015 | | `TUNAL_PLAY=