dba3a226f6
* Closing from the background: the window comes forward to ask about unsaved changes Right-click › Close on the taskbar while another app had the focus showed the "save changes?" prompt in a window that stayed behind, so the close seemed to do nothing. When the close stops at the prompt, the window now asks for the focus (unminimizing it first) and for the user's attention, which is what native Wayland offers (xdg-activation) and marks the taskbar entry where the system refuses the focus. A window already in focus is left alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * X11: ask the window manager to raise the window as a user action winit's Focus asks as an application, which KWin's focus-stealing prevention refuses for a window last used before the switch away: it raised nothing and, since the attention request was then skipped, did not even mark the taskbar. On X11 send _NET_ACTIVE_WINDOW with source 2 (a direct user action) through x11rb, which restores a minimized window too; native Wayland keeps the attention request. Moves the logic into come_forward.rs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Come forward once the taskbar menu is gone, without flicker KWin raised the window, then the taskbar's closing context menu handed the focus back to the previous app 2 to 11 ms later, so the window only came forward some of the time; asking again made it flicker. Ask 120 ms after the close instead, and again only when the focus is taken back within 50 ms of a request (a slow menu) or never came. A later switch away is the user's own and the window stays behind. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
107 lines
5.0 KiB
TOML
107 lines
5.0 KiB
TOML
[package]
|
|
name = "solidcraft"
|
|
description = "SolidCraft desktop app"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
default-run = "solidcraft"
|
|
|
|
[features]
|
|
default = ["raytrace-cpu", "bundled-render-library"]
|
|
bundled-render-library = ["solidcraft-engine/bundled-render-library"]
|
|
raytrace-cpu = ["solidcraft-engine/raytrace-cpu"]
|
|
|
|
# The workspace lints, except unsafe_code: denied, not forbidden, so that src/open_documents.rs
|
|
# (macOS file-open events), src/native_crash.rs (Windows exception filter), src/native_crash_macos.rs
|
|
# (macOS crash signal handler) and src/native_frame.rs (Windows resize border, taskbar icon) can
|
|
# allow it: none has a safe API. Keep the rest in sync with [workspace.lints].
|
|
[lints.rust]
|
|
unsafe_code = "deny"
|
|
|
|
[lints.clippy]
|
|
dbg_macro = "warn"
|
|
todo = "warn"
|
|
too_many_arguments = "allow"
|
|
type_complexity = "allow"
|
|
neg_cmp_op_on_partial_ord = "allow"
|
|
|
|
[dependencies]
|
|
solidcraft-engine = { workspace = true }
|
|
solidcraft-ui-egui = { workspace = true }
|
|
solidcraft-space-mouse = { workspace = true }
|
|
eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit", "wayland", "x11", "links"] }
|
|
egui = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
log = { workspace = true }
|
|
rfd = { workspace = true }
|
|
# Checks eframe's settings file (app.ron) before eframe reads it (src/startup.rs).
|
|
ron = "0.12"
|
|
# Waits for wgpu's adapter list when choosing the graphics backend before the window opens.
|
|
pollster = { workspace = true }
|
|
getrandom = "0.3"
|
|
# The update check (docs/updates.md): HTTPS with rustls, certificates from the operating system.
|
|
ureq = { version = "3.4", default-features = false, features = ["rustls-no-provider", "platform-verifier"] }
|
|
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12", "logging"] }
|
|
# API keys of the agent chat's API agents (docs/agent-chat.md) live in the system keychain:
|
|
# Keychain on macOS, Credential Manager on Windows, the Secret Service (pure-Rust D-Bus) elsewhere.
|
|
keyring = { version = "3.6", default-features = false, features = ["apple-native", "windows-native", "async-secret-service", "async-io", "crypto-rust"] }
|
|
|
|
[target.'cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))'.dependencies]
|
|
quick-xml = { workspace = true }
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
hidapi = { version = "2.6.7", default-features = false, features = ["windows-native"] }
|
|
# The main window's handle for src/native_frame.rs (already in the tree through eframe and winit).
|
|
raw-window-handle = "0.6"
|
|
# Native crash capture (src/native_crash.rs): the exception filter, the faulting module, a minidump.
|
|
# The window's resize border, DPI size and class icon (src/native_frame.rs): the window procedure, hit
|
|
# test, DPI, the exe's icon.
|
|
# Finding 3D mice through Plug and Play without asking other devices anything (src/space_mouse/windows_hid.rs).
|
|
windows-sys = { version = "0.61", features = [
|
|
"Win32_Devices_DeviceAndDriverInstallation",
|
|
"Win32_Devices_HumanInterfaceDevice",
|
|
"Win32_Devices_Properties",
|
|
"Win32_Foundation",
|
|
"Win32_Graphics_Gdi",
|
|
"Win32_Security",
|
|
"Win32_Storage_FileSystem",
|
|
"Win32_System_Diagnostics_Debug",
|
|
"Win32_System_IO",
|
|
"Win32_System_Kernel",
|
|
"Win32_System_LibraryLoader",
|
|
"Win32_System_Memory",
|
|
"Win32_System_Threading",
|
|
"Win32_UI_HiDpi",
|
|
"Win32_UI_WindowsAndMessaging",
|
|
] }
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
muda = { version = "0.21.2", default-features = false }
|
|
# The 3D mouse through the 3Dconnexion driver, which keeps the device to itself (src/space_mouse.rs).
|
|
solidcraft-3dx-client = { workspace = true }
|
|
# The 3D mouse (src/space_mouse.rs), in the shared-device open mode so that a running 3DxWare
|
|
# driver does not shut the app out.
|
|
hidapi = { version = "2.6.7", default-features = false, features = ["macos-shared-device"] }
|
|
# Files opened from Finder and the Dock (src/open_documents.rs), and the fullscreen title-bar
|
|
# inset (src/main.rs); all already come with eframe and rfd.
|
|
objc2 = "0.6"
|
|
objc2-app-kit = { version = "0.3", default-features = false, features = ["std", "NSApplication", "NSResponder", "NSWindow"] }
|
|
objc2-foundation = { version = "0.3", default-features = false, features = ["std", "block2", "NSArray", "NSNotification", "NSOperation", "NSProcessInfo", "NSString", "NSURL"] }
|
|
block2 = "0.6"
|
|
# Native crash capture (src/native_crash_macos.rs): the signal handler, the faulting module
|
|
# (already in the tree through many crates).
|
|
libc = "0.2"
|
|
|
|
[target.'cfg(all(unix, not(target_os = "macos")))'.dependencies]
|
|
winit = { version = "0.30", default-features = false, features = ["x11"] }
|
|
# Bringing the window forward on X11 when a close asks about unsaved designs (src/come_forward.rs):
|
|
# the window's id, and the window manager request winit doesn't send (MIT OR Apache-2.0; both
|
|
# already in the tree through eframe and winit).
|
|
raw-window-handle = "0.6"
|
|
x11rb = { version = "0.13", default-features = false }
|
|
|
|
[build-dependencies]
|
|
embed-resource = "3.0.11"
|