diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a76182d..5847e44 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -337,10 +337,12 @@ from git rather than the latest published crates because crates.io is still behind APIs Hearthspace uses, including `xilem::WindowOptionsExtLinux::with_name(general, instance)` for setting Wayland `app_id` / X11 `WM_CLASS`. +Keep these dependencies pinned to an explicit commit until intentionally +updating Xilem and rerunning the full workspace checks. ```toml -masonry = { git = "https://github.com/linebender/xilem", features = ["testing"] } -xilem = { git = "https://github.com/linebender/xilem" } +masonry = { git = "https://github.com/linebender/xilem", rev = "c5950bcb03d4f3d187a20d1159f6aa276fd056bf", features = ["testing"] } +xilem = { git = "https://github.com/linebender/xilem", rev = "c5950bcb03d4f3d187a20d1159f6aa276fd056bf" } ``` No local Xilem clone is required for normal development; Cargo fetches the git diff --git a/Cargo.lock b/Cargo.lock index 2c47196..12f412f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -126,7 +126,7 @@ dependencies = [ "accesskit_unix", "accesskit_windows", "raw-window-handle", - "winit", + "winit 0.30.13", ] [[package]] @@ -771,6 +771,16 @@ dependencies = [ "piper", ] +[[package]] +name = "borsh" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f3f6da4992df95bbcd9af42a6c7dcb994498fc9048230405f3b36ff7cd3f145" +dependencies = [ + "bytes", + "cfg_aliases", +] + [[package]] name = "built" version = "0.8.1" @@ -2267,6 +2277,7 @@ dependencies = [ "async-io", "atspi 0.30.0", "calloop 0.14.4", + "cursor-icon", "fontique", "gtk4", "hearthspace-common", @@ -2626,9 +2637,9 @@ dependencies = [ [[package]] name = "input" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdc09524a91f9cacd26f16734ff63d7dc650daffadd2b6f84d17a285bd875a9" +checksum = "f9793345a65d71317763a33066b5d8351f8760dde8d4930fe9e39b5f14a7959d" dependencies = [ "bitflags 2.13.0", "input-sys", @@ -2922,7 +2933,7 @@ dependencies = [ [[package]] name = "linebender_include_doc_path" version = "0.1.0" -source = "git+https://github.com/linebender/xilem#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" +source = "git+https://github.com/linebender/xilem?rev=c5950bcb03d4f3d187a20d1159f6aa276fd056bf#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" dependencies = [ "proc-macro2", "quote", @@ -3000,7 +3011,7 @@ dependencies = [ [[package]] name = "masonry" version = "0.4.0" -source = "git+https://github.com/linebender/xilem#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" +source = "git+https://github.com/linebender/xilem?rev=c5950bcb03d4f3d187a20d1159f6aa276fd056bf#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" dependencies = [ "accesskit", "linebender_include_doc_path", @@ -3015,7 +3026,7 @@ dependencies = [ [[package]] name = "masonry_core" version = "0.4.0" -source = "git+https://github.com/linebender/xilem#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" +source = "git+https://github.com/linebender/xilem?rev=c5950bcb03d4f3d187a20d1159f6aa276fd056bf#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" dependencies = [ "accesskit", "anymap3", @@ -3042,7 +3053,7 @@ dependencies = [ [[package]] name = "masonry_imaging" version = "0.4.0" -source = "git+https://github.com/linebender/xilem#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" +source = "git+https://github.com/linebender/xilem?rev=c5950bcb03d4f3d187a20d1159f6aa276fd056bf#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" dependencies = [ "imaging", "imaging_vello", @@ -3055,7 +3066,7 @@ dependencies = [ [[package]] name = "masonry_testing" version = "0.4.0" -source = "git+https://github.com/linebender/xilem#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" +source = "git+https://github.com/linebender/xilem?rev=c5950bcb03d4f3d187a20d1159f6aa276fd056bf#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" dependencies = [ "accesskit_consumer 0.35.0", "image", @@ -3068,7 +3079,7 @@ dependencies = [ [[package]] name = "masonry_winit" version = "0.4.0" -source = "git+https://github.com/linebender/xilem#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" +source = "git+https://github.com/linebender/xilem?rev=c5950bcb03d4f3d187a20d1159f6aa276fd056bf#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" dependencies = [ "accesskit_winit", "copypasta", @@ -3078,7 +3089,7 @@ dependencies = [ "tracing", "ui-events-winit", "wgpu", - "winit", + "winit 0.30.13", ] [[package]] @@ -3433,6 +3444,7 @@ dependencies = [ "bitflags 2.13.0", "block2 0.6.2", "objc2 0.6.4", + "objc2-core-foundation", "objc2-foundation 0.3.2", ] @@ -3479,10 +3491,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ "bitflags 2.13.0", + "block2 0.6.2", "dispatch2", "objc2 0.6.4", ] +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.13.0", + "libc", + "objc2-core-foundation", +] + [[package]] name = "objc2-core-image" version = "0.2.2" @@ -3517,6 +3541,17 @@ dependencies = [ "objc2-core-foundation", ] +[[package]] +name = "objc2-core-video" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d425caf1df73233f29fd8a5c3e5edbc30d2d4307870f802d18f00d83dc5141a6" +dependencies = [ + "bitflags 2.13.0", + "objc2-core-foundation", + "objc2-core-graphics", +] + [[package]] name = "objc2-encode" version = "4.1.0" @@ -3543,6 +3578,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ "bitflags 2.13.0", + "block2 0.6.2", "objc2 0.6.4", "objc2-core-foundation", ] @@ -3615,6 +3651,18 @@ dependencies = [ "objc2-user-notifications", ] +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags 2.13.0", + "objc2 0.6.4", + "objc2-core-foundation", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-uniform-type-identifiers" version = "0.2.2" @@ -4335,6 +4383,18 @@ version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" +[[package]] +name = "reis" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81f3fedd2777cde52c1be5e572efbec485eac7b801c47820eda388d4f13b9c4b" +dependencies = [ + "calloop 0.14.4", + "enumflags2", + "log", + "rustix 1.1.4", +] + [[package]] name = "relative-path" version = "1.9.3" @@ -4733,8 +4793,7 @@ checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" [[package]] name = "smithay" version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740cea6927892bc182d5bf70c8f79806c8bc9f68f2fb96e55a30be171b63af98" +source = "git+https://github.com/Smithay/smithay?rev=cb1eb2a3f48d95a7ea4b030159a2512ba667a2fb#cb1eb2a3f48d95a7ea4b030159a2512ba667a2fb" dependencies = [ "aliasable", "appendlist", @@ -4759,6 +4818,7 @@ dependencies = [ "pkg-config", "profiling", "rand", + "reis", "rustix 1.1.4", "sha2", "smallvec", @@ -4773,7 +4833,7 @@ dependencies = [ "wayland-protocols-misc", "wayland-protocols-wlr", "wayland-server", - "winit", + "winit 0.31.0-beta.2", "xkbcommon", ] @@ -4849,6 +4909,16 @@ dependencies = [ "serde", ] +[[package]] +name = "smol_str" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4aaa7368fcf4852a4c2dd92df0cace6a71f2091ca0a23391ce7f3a31833f1523" +dependencies = [ + "borsh", + "serde_core", +] + [[package]] name = "socket2" version = "0.6.4" @@ -5365,7 +5435,7 @@ dependencies = [ [[package]] name = "tree_arena" version = "0.2.0" -source = "git+https://github.com/linebender/xilem#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" +source = "git+https://github.com/linebender/xilem?rev=c5950bcb03d4f3d187a20d1159f6aa276fd056bf#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" dependencies = [ "hashbrown 0.17.1", ] @@ -5433,7 +5503,7 @@ checksum = "de12c5f7e256ff97aa9a710a5e2fb345bb59302c98d77a3d2f249100d92145d4" dependencies = [ "ui-events", "web-time", - "winit", + "winit 0.30.13", ] [[package]] @@ -6142,7 +6212,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.48.0", ] [[package]] @@ -6438,7 +6508,7 @@ dependencies = [ "objc2 0.5.2", "objc2-app-kit 0.2.2", "objc2-foundation 0.2.2", - "objc2-ui-kit", + "objc2-ui-kit 0.2.2", "orbclient", "percent-encoding", "pin-project", @@ -6447,7 +6517,7 @@ dependencies = [ "rustix 0.38.44", "sctk-adwaita", "smithay-client-toolkit 0.19.2", - "smol_str", + "smol_str 0.2.2", "tracing", "unicode-segmentation", "wasm-bindgen", @@ -6464,6 +6534,230 @@ dependencies = [ "xkbcommon-dl", ] +[[package]] +name = "winit" +version = "0.31.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2879d2854d1a43e48f67322d4bd097afcb6eb8f8f775c8de0260a71aea1df1aa" +dependencies = [ + "bitflags 2.13.0", + "cfg_aliases", + "cursor-icon", + "dpi", + "libc", + "raw-window-handle", + "rustix 1.1.4", + "smol_str 0.3.6", + "tracing", + "winit-android", + "winit-appkit", + "winit-common", + "winit-core", + "winit-orbital", + "winit-uikit", + "winit-wayland", + "winit-web", + "winit-win32", + "winit-x11", +] + +[[package]] +name = "winit-android" +version = "0.31.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d9c0d2cd93efec3a9f9ad819cfaf0834782403af7c0d248c784ec0c61761df" +dependencies = [ + "android-activity", + "bitflags 2.13.0", + "dpi", + "ndk", + "raw-window-handle", + "smol_str 0.3.6", + "tracing", + "winit-core", +] + +[[package]] +name = "winit-appkit" +version = "0.31.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21310ca07851a49c348e0c2cc768e36b52ca65afda2c2354d78ed4b90074d8aa" +dependencies = [ + "bitflags 2.13.0", + "block2 0.6.2", + "dispatch2", + "dpi", + "objc2 0.6.4", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-video", + "objc2-foundation 0.3.2", + "raw-window-handle", + "smol_str 0.3.6", + "tracing", + "winit-common", + "winit-core", +] + +[[package]] +name = "winit-common" +version = "0.31.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45375fbac4cbb77260d83a30b1f9d8105880dbac99a9ae97f56656694680ff69" +dependencies = [ + "memmap2", + "objc2 0.6.4", + "objc2-core-foundation", + "smol_str 0.3.6", + "tracing", + "winit-core", + "x11-dl", + "xkbcommon-dl", +] + +[[package]] +name = "winit-core" +version = "0.31.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4f0ccd7abb43740e2c6124ac7cae7d865ecec74eec63783e8922577ac232583" +dependencies = [ + "bitflags 2.13.0", + "cursor-icon", + "dpi", + "keyboard-types", + "raw-window-handle", + "smol_str 0.3.6", + "web-time", +] + +[[package]] +name = "winit-orbital" +version = "0.31.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51ea1fb262e7209f265f12bd0cc792c399b14355675e65531e9c8a87db287d46" +dependencies = [ + "bitflags 2.13.0", + "dpi", + "orbclient", + "raw-window-handle", + "redox_syscall 0.5.18", + "smol_str 0.3.6", + "tracing", + "winit-core", +] + +[[package]] +name = "winit-uikit" +version = "0.31.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680a356e798837d8eb274d4556e83bceaf81698194e31aafc5cfb8a9f2fab643" +dependencies = [ + "bitflags 2.13.0", + "block2 0.6.2", + "dispatch2", + "dpi", + "objc2 0.6.4", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-ui-kit 0.3.2", + "raw-window-handle", + "smol_str 0.3.6", + "tracing", + "winit-common", + "winit-core", +] + +[[package]] +name = "winit-wayland" +version = "0.31.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce5afb2ba07da603f84b722c95f9f9396d2cedae3944fb6c0cda4a6f88de545" +dependencies = [ + "ahash", + "bitflags 2.13.0", + "calloop 0.14.4", + "cursor-icon", + "dpi", + "libc", + "memmap2", + "raw-window-handle", + "rustix 1.1.4", + "smithay-client-toolkit 0.20.0", + "smol_str 0.3.6", + "tracing", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", + "winit-common", + "winit-core", +] + +[[package]] +name = "winit-web" +version = "0.31.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c2490a953fb776fbbd5e295d54f1c3847f4f15b6c3929ec53c09acda6487a92" +dependencies = [ + "atomic-waker", + "bitflags 2.13.0", + "concurrent-queue", + "cursor-icon", + "dpi", + "js-sys", + "pin-project", + "raw-window-handle", + "smol_str 0.3.6", + "tracing", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "web-time", + "winit-core", +] + +[[package]] +name = "winit-win32" +version = "0.31.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "644ea78af0e858aa3b092e5d1c67c41995a98220c81813f1353b28bc8bb91eaa" +dependencies = [ + "bitflags 2.13.0", + "cursor-icon", + "dpi", + "raw-window-handle", + "smol_str 0.3.6", + "tracing", + "unicode-segmentation", + "windows-sys 0.59.0", + "winit-core", +] + +[[package]] +name = "winit-x11" +version = "0.31.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa5b600756534c7041aa93cd0d244d44b09fca1b89e202bd1cd80dd9f3636c46" +dependencies = [ + "bitflags 2.13.0", + "bytemuck", + "calloop 0.14.4", + "cursor-icon", + "dpi", + "libc", + "percent-encoding", + "raw-window-handle", + "rustix 1.1.4", + "smol_str 0.3.6", + "tracing", + "winit-common", + "winit-core", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + [[package]] name = "winnow" version = "1.0.3" @@ -6528,6 +6822,7 @@ dependencies = [ "once_cell", "rustix 1.1.4", "x11rb-protocol", + "xcursor", ] [[package]] @@ -6545,13 +6840,13 @@ checksum = "bec9e4a500ca8864c5b47b8b482a73d62e4237670e5b5f1d6b9e3cae50f28f2b" [[package]] name = "xilem" version = "0.4.0" -source = "git+https://github.com/linebender/xilem#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" +source = "git+https://github.com/linebender/xilem?rev=c5950bcb03d4f3d187a20d1159f6aa276fd056bf#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" dependencies = [ "masonry", "masonry_winit", "tokio", "tracing", - "winit", + "winit 0.30.13", "xilem_core", "xilem_masonry", ] @@ -6563,7 +6858,7 @@ version = "0.1.0" [[package]] name = "xilem_core" version = "0.4.0" -source = "git+https://github.com/linebender/xilem#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" +source = "git+https://github.com/linebender/xilem?rev=c5950bcb03d4f3d187a20d1159f6aa276fd056bf#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" dependencies = [ "anymore", "hashbrown 0.17.1", @@ -6573,7 +6868,7 @@ dependencies = [ [[package]] name = "xilem_masonry" version = "0.4.0" -source = "git+https://github.com/linebender/xilem#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" +source = "git+https://github.com/linebender/xilem?rev=c5950bcb03d4f3d187a20d1159f6aa276fd056bf#c5950bcb03d4f3d187a20d1159f6aa276fd056bf" dependencies = [ "masonry", "smallvec", @@ -6585,9 +6880,9 @@ dependencies = [ [[package]] name = "xkbcommon" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d66ca9352cbd4eecbbc40871d8a11b4ac8107cfc528a6e14d7c19c69d0e1ac9" +checksum = "a7a974f48060a14e95705c01f24ad9c3345022f4d97441b8a36beb7ed5c4a02d" dependencies = [ "libc", "memmap2", diff --git a/crates/hearthspace-compositor/Cargo.toml b/crates/hearthspace-compositor/Cargo.toml index 3f0e91b..6afabd9 100644 --- a/crates/hearthspace-compositor/Cargo.toml +++ b/crates/hearthspace-compositor/Cargo.toml @@ -30,6 +30,7 @@ path = "src/bin/hearthspace.rs" async-io = "2.3.3" atspi = { version = "0.30.0", features = ["zbus"] } calloop = { version = "0.14.4", features = ["signals"] } +cursor-icon = "1.2.0" gtk = { package = "gtk4", version = "0.11", optional = true } hearthspace-common = { path = "../hearthspace-common" } hearthspace-ipc = { path = "../hearthspace-ipc" } @@ -37,8 +38,8 @@ hearthspace-shell = { path = "../hearthspace-shell" } # Xilem (app shell) and Masonry (compositor-side imaging) are pulled from # upstream git because the latest published crates are still behind the APIs we # use, including `WindowOptionsExtLinux::with_name`. -masonry = { git = "https://github.com/linebender/xilem", features = ["testing"] } -xilem = { git = "https://github.com/linebender/xilem" } +masonry = { git = "https://github.com/linebender/xilem", rev = "c5950bcb03d4f3d187a20d1159f6aa276fd056bf", features = ["testing"] } +xilem = { git = "https://github.com/linebender/xilem", rev = "c5950bcb03d4f3d187a20d1159f6aa276fd056bf" } # naga 28 (pulled in transitively via wgpu/vello) only compiles its WGSL # error-emit path when the `termcolor` feature is enabled, but the crates that # depend on it (wgpu-core, vello_shaders) enable `wgsl-in` without it. We add a @@ -53,7 +54,7 @@ fontique = { version = "0.8.0", features = ["fontconfig-dlopen"] } # already, so this only fixes the version we link against. image = { version = "0.25", default-features = false } png = "0.18.1" -smithay = { version = "0.7.0", default-features = false, features = ["desktop", "renderer_gl", "wayland_frontend"] } +smithay = { git = "https://github.com/Smithay/smithay", rev = "cb1eb2a3f48d95a7ea4b030159a2512ba667a2fb", default-features = false, features = ["desktop", "renderer_gl", "wayland_frontend"] } tracing = "0.1.41" tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } wayland-protocols = { version = "0.32.8", features = ["server"] } diff --git a/crates/hearthspace-compositor/src/compositor/cursor.rs b/crates/hearthspace-compositor/src/compositor/cursor.rs index 5316f46..ff9ba00 100644 --- a/crates/hearthspace-compositor/src/compositor/cursor.rs +++ b/crates/hearthspace-compositor/src/compositor/cursor.rs @@ -6,7 +6,7 @@ use smithay::{ use xcursor::parser::parse_xcursor; #[cfg(feature = "winit")] -pub(crate) use smithay::reexports::winit::window::CursorIcon; +pub(crate) use cursor_icon::CursorIcon; #[cfg(not(feature = "winit"))] #[derive(Debug, Clone, Copy, PartialEq, Eq)] diff --git a/crates/hearthspace-compositor/src/compositor/handlers.rs b/crates/hearthspace-compositor/src/compositor/handlers.rs index 3309065..59300a8 100644 --- a/crates/hearthspace-compositor/src/compositor/handlers.rs +++ b/crates/hearthspace-compositor/src/compositor/handlers.rs @@ -1,5 +1,3 @@ -use std::os::unix::io::OwnedFd; - use smithay::{ backend::allocator::dmabuf::Dmabuf, backend::renderer::utils::on_commit_buffer_handler, @@ -23,9 +21,7 @@ use smithay::{ output::OutputHandler, selection::{ SelectionHandler, - data_device::{ - ClientDndGrabHandler, DataDeviceHandler, DataDeviceState, ServerDndGrabHandler, - }, + data_device::{DataDeviceHandler, DataDeviceState, WaylandDndGrabHandler}, }, shell::xdg::{ PopupSurface, PositionerState, ToplevelSurface, XdgShellHandler, XdgShellState, @@ -348,15 +344,12 @@ impl SelectionHandler for App { } impl DataDeviceHandler for App { - fn data_device_state(&self) -> &DataDeviceState { - &self.data_device_state + fn data_device_state(&mut self) -> &mut DataDeviceState { + &mut self.data_device_state } } -impl ClientDndGrabHandler for App {} -impl ServerDndGrabHandler for App { - fn send(&mut self, _mime_type: String, _fd: OwnedFd, _seat: Seat) {} -} +impl WaylandDndGrabHandler for App {} impl CompositorHandler for App { fn compositor_state(&mut self) -> &mut CompositorState { diff --git a/crates/hearthspace-compositor/src/compositor/mod.rs b/crates/hearthspace-compositor/src/compositor/mod.rs index 339d619..06d84bc 100644 --- a/crates/hearthspace-compositor/src/compositor/mod.rs +++ b/crates/hearthspace-compositor/src/compositor/mod.rs @@ -30,9 +30,11 @@ pub(in crate::compositor) use input::handle_input_event; #[cfg(feature = "udev")] pub(in crate::compositor) use output::{OutputDescriptor, create_output_with_properties}; pub(in crate::compositor) use output::{OutputLayout, OutputRecord, OutputSet, create_output}; +#[cfg(any(feature = "winit", feature = "udev"))] +pub(in crate::compositor) use runtime::Backend; #[cfg(feature = "udev")] pub(in crate::compositor) use runtime::create_calloop_data; -pub(in crate::compositor) use runtime::{Backend, CalloopData, HeadlessBackend, run_event_loop}; +pub(in crate::compositor) use runtime::{CalloopData, HeadlessBackend, run_event_loop}; use shell_integration::{ accept_command_connections, command_socket_path, remove_stale_socket, spawn_shell, }; @@ -45,7 +47,6 @@ pub use udev::run_udev; use calloop::signals::{Signal, Signals}; use client::ClientState; use cursor::{CursorIcon, SoftwareCursor}; -#[cfg(any(feature = "winit", feature = "udev"))] use smithay::backend::input::TouchSlot; #[cfg(feature = "winit")] use smithay::backend::winit::{self, WinitEvent}; @@ -58,8 +59,6 @@ use smithay::{ egl::{EGLContext, EGLDevice, EGLDisplay, native::EGLSurfacelessDisplay}, renderer::{ImportDma, Offscreen, element::Id, gles::GlesRenderer}, }, - delegate_compositor, delegate_data_device, delegate_dmabuf, delegate_output, delegate_seat, - delegate_shm, delegate_xdg_decoration, delegate_xdg_shell, desktop::PopupManager, input::{Seat, SeatState, keyboard::KeyboardHandle, pointer::PointerHandle}, reexports::{ @@ -594,11 +593,4 @@ fn log_idle_transition(transition: IdleTransition) { ); } -delegate_xdg_shell!(App); -delegate_compositor!(App); -delegate_shm!(App); -delegate_seat!(App); -delegate_data_device!(App); -delegate_output!(App); -delegate_xdg_decoration!(App); -delegate_dmabuf!(App); +smithay::delegate_dispatch2!(App); diff --git a/crates/hearthspace-compositor/src/compositor/output.rs b/crates/hearthspace-compositor/src/compositor/output.rs index 5f37252..e3a47f1 100644 --- a/crates/hearthspace-compositor/src/compositor/output.rs +++ b/crates/hearthspace-compositor/src/compositor/output.rs @@ -429,6 +429,7 @@ pub(in crate::compositor) fn create_output( subpixel: Subpixel::Unknown, make: "Hearthspace".into(), model: "Nested Canvas".into(), + serial_number: "Unknown".into(), }, size, scale, diff --git a/crates/hearthspace-compositor/src/compositor/output/layout.rs b/crates/hearthspace-compositor/src/compositor/output/layout.rs index 9fb23c4..379c54f 100644 --- a/crates/hearthspace-compositor/src/compositor/output/layout.rs +++ b/crates/hearthspace-compositor/src/compositor/output/layout.rs @@ -488,6 +488,7 @@ mod tests { subpixel: Subpixel::Unknown, make: "test".into(), model: name.into(), + serial_number: "test".into(), }, size: Size::::from((100, 100)), scale: 1, diff --git a/crates/hearthspace-compositor/src/compositor/runtime.rs b/crates/hearthspace-compositor/src/compositor/runtime.rs index 15d6cb0..c38454f 100644 --- a/crates/hearthspace-compositor/src/compositor/runtime.rs +++ b/crates/hearthspace-compositor/src/compositor/runtime.rs @@ -211,7 +211,11 @@ impl CalloopData { backend .window() .set_cursor_visible(self.state.cursor_visible); - backend.window().set_cursor(self.applied_cursor); + backend + .window() + .set_cursor(smithay::reexports::winit::cursor::Cursor::Icon( + self.applied_cursor, + )); } } diff --git a/crates/hearthspace-compositor/src/compositor/udev/device.rs b/crates/hearthspace-compositor/src/compositor/udev/device.rs index 0ee2644..25b6cc3 100644 --- a/crates/hearthspace-compositor/src/compositor/udev/device.rs +++ b/crates/hearthspace-compositor/src/compositor/udev/device.rs @@ -83,6 +83,7 @@ impl KmsOutputTarget { subpixel: Subpixel::Unknown, make: "DRM".into(), model: self.connector_name.clone(), + serial_number: self.connector_name.clone(), }, size: self.output_size(), scale: 1, diff --git a/crates/hearthspace-compositor/src/compositor/udev/input.rs b/crates/hearthspace-compositor/src/compositor/udev/input.rs index e75a580..fe9fbb5 100644 --- a/crates/hearthspace-compositor/src/compositor/udev/input.rs +++ b/crates/hearthspace-compositor/src/compositor/udev/input.rs @@ -37,9 +37,11 @@ impl UdevBackendState { pub(super) fn log_input_event(event: &InputEvent) { match event { - InputEvent::DeviceAdded { device } => debug!(name = device.name(), "input device added"), + InputEvent::DeviceAdded { device } => { + debug!(name = ?device.name(), "input device added"); + } InputEvent::DeviceRemoved { device } => { - debug!(name = device.name(), "input device removed"); + debug!(name = ?device.name(), "input device removed"); } InputEvent::Keyboard { .. } => trace!("input keyboard event"), InputEvent::PointerMotion { .. } => trace!("input relative pointer motion event"), diff --git a/crates/hearthspace-settings/Cargo.toml b/crates/hearthspace-settings/Cargo.toml index 13fbdb9..7074184 100644 --- a/crates/hearthspace-settings/Cargo.toml +++ b/crates/hearthspace-settings/Cargo.toml @@ -11,7 +11,7 @@ hearthspace-ipc = { path = "../hearthspace-ipc" } hearthspace-ui-components = { path = "../ui-components" } rfd = { version = "0.17.2", features = ["xdg-portal"] } wayland-client = "0.31.14" -xilem = { git = "https://github.com/linebender/xilem" } +xilem = { git = "https://github.com/linebender/xilem", rev = "c5950bcb03d4f3d187a20d1159f6aa276fd056bf" } [lints.rust] unsafe_op_in_unsafe_fn = "deny" diff --git a/crates/hearthspace-shell/Cargo.toml b/crates/hearthspace-shell/Cargo.toml index 03821c7..dc1d037 100644 --- a/crates/hearthspace-shell/Cargo.toml +++ b/crates/hearthspace-shell/Cargo.toml @@ -11,7 +11,7 @@ hearthspace-ui-components = { path = "../ui-components" } tracing = "0.1.41" tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } wayland-client = "0.31.14" -xilem = { git = "https://github.com/linebender/xilem" } +xilem = { git = "https://github.com/linebender/xilem", rev = "c5950bcb03d4f3d187a20d1159f6aa276fd056bf" } [dev-dependencies] rstest = "0.26" diff --git a/crates/hearthspace-ui-storybook/Cargo.toml b/crates/hearthspace-ui-storybook/Cargo.toml index 33f6740..40d2917 100644 --- a/crates/hearthspace-ui-storybook/Cargo.toml +++ b/crates/hearthspace-ui-storybook/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0" [dependencies] hearthspace-ui-components = { path = "../ui-components" } -xilem = { git = "https://github.com/linebender/xilem" } +xilem = { git = "https://github.com/linebender/xilem", rev = "c5950bcb03d4f3d187a20d1159f6aa276fd056bf" } xilem-storybook = { path = "../xilem-storybook" } [lints.rust] diff --git a/crates/ui-components/Cargo.toml b/crates/ui-components/Cargo.toml index 0159796..20516fe 100644 --- a/crates/ui-components/Cargo.toml +++ b/crates/ui-components/Cargo.toml @@ -6,7 +6,7 @@ rust-version = "1.93.1" license = "Apache-2.0" [dependencies] -xilem = { git = "https://github.com/linebender/xilem" } +xilem = { git = "https://github.com/linebender/xilem", rev = "c5950bcb03d4f3d187a20d1159f6aa276fd056bf" } [lints.rust] unsafe_op_in_unsafe_fn = "deny"