mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
Part of #491: pen taps click where they tap; Linux note for tablet pens on Wayland
Pens on KDE Plasma 6.3+ under Wayland don't reach the app: winit 0.30 binds no Wayland tablet protocol (zwp_tablet_v2), and since Plasma 6.3 KWin no longer emulates pointer input for such clients (kwin!6336), so the pen moves KWin's own cursor while the window gets no motion or presses. The fix is upstream (winit 0.31's tablet input, winit#4318, once eframe moves to it). docs/development.md and the README give the workarounds: run under XWayland (WAYLAND_DISPLAY=), or set KWIN_WAYLAND_EMULATE_TABLET=1 for the session. On our side, a pen or finger (winit Touch, emulated as a mouse by egui-winit) lifts with an egui PointerGone in the same frame. A tap whose press and lift arrived in one frame had no hover position, so the canvas ignored it, and a drag ending without a pointer position ended at the canvas's centre. The press and double-tap now fall back to the interact position, and the release to the last position seen during the drag. Headless frame tests replay the events a pen produces: a stroke with pressure reaching Use Pressure Pen, and a one-frame tap that selects without moving (fails without the fix). ROADMAP: Last updated, the Platforms row, the hardening gap and the graphics processor/input bullet (pen pressure reaches the tools on Windows only). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d9fc3b6505
commit
744edddaea
@@ -64,6 +64,7 @@ The window runs natively on Wayland (eframe's `wayland` feature) and on X11. The
|
||||
- **Clipboard:** under Wayland arboard talks to the compositor through the data-control protocol (wlroots compositors such as Sway and Hyprland, KDE Plasma), so bitmaps (`image/png`), SVG markup and text copied in any app paste (#398). Where the compositor lacks the protocol (GNOME's Mutter, [arboard#223](https://github.com/1Password/arboard/issues/223)), arboard falls back to the X11 clipboard through XWayland, which only holds what X11 apps copied. egui's own text paste into fields goes through smithay-clipboard and works either way.
|
||||
- **Copied files:** files copied in a file manager (`text/uri-list`; `CF_HDROP` on Windows, file URLs on macOS) paste as the first one that is art (SVG, PDF, EMF/WMF or a bitmap), before the clipboard's other formats (which include the files' paths as text).
|
||||
- **Dropping files on the window does not work under Wayland:** winit 0.30, which eframe 0.36 runs on, has no Wayland drag and drop ([winit#1881](https://github.com/rust-windowing/winit/issues/1881), added in winit 0.31; [egui#1563](https://github.com/emilk/egui/issues/1563)), so no `dropped_files` arrive. Until eframe moves to winit 0.31: copy the files in the file manager and paste them, use File › Place or Open, or run the app under XWayland, where drops work (`WAYLAND_DISPLAY= vectorcraft`).
|
||||
- **Pens and pen displays under Wayland (#491):** winit 0.30 doesn't bind the Wayland tablet protocol (`zwp_tablet_v2`; tablet input arrives in winit 0.31, [winit#4318](https://github.com/rust-windowing/winit/pull/4318), [egui#7731](https://github.com/emilk/egui/pull/7731)). Since Plasma 6.3, KWin no longer turns tablet input into pointer input for such apps ([kwin!6336](https://invent.kde.org/plasma/kwin/-/merge_requests/6336)): the pen moves the compositor's cursor over the window, but the app gets no motion or presses and shows none of its own cursors. Until eframe moves to winit 0.31, either run the app under XWayland, which supports the tablet protocol and hands the pen to X11 apps as a pointer (`WAYLAND_DISPLAY= vectorcraft`, or `env -u WAYLAND_DISPLAY vectorcraft`; for a desktop launcher, put `env WAYLAND_DISPLAY=` before the command in its `Exec=` line), or turn KWin's deprecated emulation back on for the whole session by setting `KWIN_WAYLAND_EMULATE_TABLET=1` in KWin's environment (for example in a file under `~/.config/environment.d/` or in `/etc/environment`) and logging in again. The pen then works as a mouse, without pressure: winit 0.30 reads pen pressure on Windows only (Windows Ink, which reaches the Liquify tools' Use Pressure Pen). Other compositors that don't emulate a pointer for tablets behave the same way.
|
||||
|
||||
## Fonts: craft-fonts (optional build input)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user