mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-26 18:56:55 -06:00
Under Wayland the window is native but arboard was built without its data-control backend, so it read the X11 clipboard through XWayland, which only holds what X11 apps copied: Paste found nothing and reported an empty clipboard (egui's text paste into fields uses smithay-clipboard, which is why that worked). arboard now has `wayland-data-control`, the same as PhotoCraft; it falls back to X11 where the compositor lacks the protocol (GNOME's Mutter). The reporter's clipboard also held text/uri-list: with a file copied in a file manager, Paste would have taken the path as text before the bitmap. Copied files now paste first, as the first one that is art (SVG, PDF, EMF/WMF or a bitmap), told from its first 4 KiB by the engine's format detection (`clipboard::file_flavour`): text/uri-list through arboard on Linux and macOS (a trailing CR from CRLF lists trimmed), CF_HDROP on Windows, read with the clipboard closed again. Dropping files on the window can't work under Wayland yet: winit 0.30, which eframe 0.36 runs on, has no Wayland drag and drop (winit#1881, added in 0.31), so no dropped_files arrive. docs/development.md documents it and the workarounds (copy and paste the files, File > Place, or run under XWayland with `WAYLAND_DISPLAY=`). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
50 lines
1.8 KiB
TOML
50 lines
1.8 KiB
TOML
[package]
|
|
name = "vectorcraft"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
default-run = "vectorcraft"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
default = ["wgpu", "accessibility"]
|
|
wgpu = ["eframe/wgpu"]
|
|
accessibility = ["eframe/accesskit"]
|
|
# Build with --no-default-features --features windows7 and the win7 Rust target.
|
|
windows7 = ["eframe/glow"]
|
|
|
|
[dependencies]
|
|
vectorcraft-engine = { workspace = true }
|
|
vectorcraft-ui-egui = { workspace = true }
|
|
eframe = { workspace = true, features = ["default_fonts", "wayland", "x11"] }
|
|
egui = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
log = { workspace = true }
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
rfd = { workspace = true }
|
|
# wayland-data-control: native Wayland clipboard (Linux; X11 through XWayland only sees what X11 apps copied).
|
|
arboard = { workspace = true, features = ["image-data", "wayland-data-control"] }
|
|
image = { workspace = true }
|
|
webbrowser = { workspace = true }
|
|
# The window's monitors, size and position (the same winit eframe runs on).
|
|
winit = { version = "0.30", default-features = false }
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
clipboard-win = { workspace = true }
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
muda = { version = "0.21", default-features = false }
|
|
objc2 = "0.6"
|
|
objc2-app-kit = { version = "0.3", default-features = false, features = ["std", "NSApplication", "NSResponder", "NSTextInputContext"] }
|
|
# Files opened from Finder and the Dock (src/open_documents.rs); both already come with winit, muda and rfd.
|
|
objc2-foundation = { version = "0.3", default-features = false, features = ["std", "block2", "NSArray", "NSNotification", "NSOperation", "NSString", "NSURL"] }
|
|
block2 = "0.6"
|
|
|
|
[build-dependencies]
|
|
# Icon + VERSIONINFO for vectorcraft.exe; build.rs only uses it when targeting Windows.
|
|
winresource = "0.1"
|