S030: native drag and drop and file clipboard on Wayland
Own queue on Slint's wl_display (thread), drag out via start_drag with an shm icon, drag in through Slint's drop handling (same drop targets and menu), copy/cut/paste of files with other apps. Off on X11. Wayland checks deferred to S036 (D-038). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
parent
19d35f5c61
commit
34c76a2c66
1 changed files with 1015 additions and 12 deletions
|
|
@ -235,6 +235,15 @@ One entry per session, newest last, ≤ 15 lines: done, verified how, not done,
|
|||
- Not done: no live clicks (add/edit flow, password dialog with a real server, press motion not watched); the dialogs reuse `Dialog` motion only. Keyboard-interactive and password logins untested. Connection dialog is tall at 480 px window height. No key-file picker (path typed).
|
||||
- Later: file picker for the key; show connection errors in the sidebar; per-connection options (compression, keepalive).
|
||||
|
||||
## S030 — Native DnD and file clipboard on Wayland
|
||||
- Done (D-039): `native/wayland.rs`: our own queue on Slint's foreign `wl_display` (seat → own pointer/keyboard for serials, `wl_data_device` v3, `wl_compositor`/`wl_shm` for the drag icon), dispatched on the `tunal-wayland` thread; events go to the UI as `native::Event`s. `native/mod.rs` `Native` (`native::current()`, attached by `attach_later` once the window has a handle; `None` on X11 and in screenshots): `arm(uris)` + `set_drag_icon(image)` (called from `dnd.rs` when an in-app drag starts), `set_clipboard(uris, cut)`, `clipboard_has_files()`, `read_clipboard(done)`. **S031 implements the same API for X11.**
|
||||
- Drag out: when the pointer leaves the window with the button held, `start_drag` (press serial) with uri-list, `text/plain;charset=utf-8`, `text/plain` and `application/x-tunal-uris`, SVG drag image as an shm icon; Copy only; a synthetic release ends Slint's in-window drag; stderr logs `start_drag` and the finish.
|
||||
- Drag in: offers on our surface are read as uri-list and fed to Slint's `WindowInner::process_drag_event` (`i-slint-core =1.19.0`): same DropZones, glow and drop menu as in-app; the offer is accepted only over a target that takes it.
|
||||
- Clipboard (`clipboard.rs`): copy/cut also set the selection (+ `x-special/gnome-copied-files`); paste prefers another app's files (cut → move).
|
||||
- Verified: build, clippy -D warnings, fmt; X11 fallback: app ran 8 s under Xvfb with `WAYLAND_DISPLAY` unset, no crash.
|
||||
- Not done: no Wayland run at all (no headless compositor; orchestrator: no window on the live session); attach, drag out/in and clipboard with other apps are deferred to S036.
|
||||
- Later: Move/Link for drag out; modifiers for drags coming in (keyboard focus during a foreign drag).
|
||||
|
||||
## Later
|
||||
- (orchestrator) Breadcrumb: a long path is hard-clipped at the bar's left edge with no elision mark, and the root crumb elides at 960 px — for S034.
|
||||
-
|
||||
|
|
|
|||
Loading…
Reference in a new issue