diff --git a/Cargo.lock b/Cargo.lock index 313df4a..bfba3eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -112,9 +112,9 @@ dependencies = [ "jni-sys", "libc", "log", - "ndk 0.9.0", + "ndk", "ndk-context", - "ndk-sys 0.6.0+11769913", + "ndk-sys", "num_enum", "thiserror 1.0.69", ] @@ -280,9 +280,9 @@ dependencies = [ [[package]] name = "ashpd" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cbdf310d77fd3aaee6ea2093db7011dc2d35d2eb3481e5607f1f8d942ed99df" +checksum = "da0986d5b4f0802160191ad75f8d33ada000558757db3defb70299ca95d9fcbd" dependencies = [ "async-fs", "async-net", @@ -478,6 +478,12 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +[[package]] +name = "atomic_float" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "628d228f918ac3b82fe590352cc719d30664a0c13ca3a60266fe02c7132d480a" + [[package]] name = "atty" version = "0.2.14" @@ -678,24 +684,6 @@ dependencies = [ "which", ] -[[package]] -name = "bindgen" -version = "0.72.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" -dependencies = [ - "bitflags 2.9.4", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "proc-macro2", - "quote", - "regex", - "rustc-hash 2.1.1", - "shlex", - "syn 2.0.106", -] - [[package]] name = "bitflags" version = "1.3.2" @@ -862,6 +850,18 @@ dependencies = [ "wayland-client", ] +[[package]] +name = "calloop-wayland-source" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa" +dependencies = [ + "calloop 0.14.3", + "rustix 1.1.2", + "wayland-backend", + "wayland-client", +] + [[package]] name = "cc" version = "1.2.38" @@ -1162,22 +1162,16 @@ dependencies = [ [[package]] name = "coreaudio-rs" -version = "0.11.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "321077172d79c662f64f5071a03120748d5bb652f5231570141be24cfcd2bace" +checksum = "1aae284fbaf7d27aa0e292f7677dfbe26503b0d555026f702940805a630eac17" dependencies = [ "bitflags 1.3.2", - "core-foundation-sys", - "coreaudio-sys", -] - -[[package]] -name = "coreaudio-sys" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceec7a6067e62d6f931a2baf6f3a751f4a892595bcec1461a3c94ef9949864b6" -dependencies = [ - "bindgen 0.72.1", + "libc", + "objc2-audio-toolbox", + "objc2-core-audio", + "objc2-core-audio-types", + "objc2-core-foundation", ] [[package]] @@ -1205,21 +1199,24 @@ dependencies = [ [[package]] name = "cpal" -version = "0.15.3" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "873dab07c8f743075e57f524c583985fbaf745602acbe916a01539364369a779" +checksum = "cbd307f43cc2a697e2d1f8bc7a1d824b5269e052209e28883e5bc04d095aaa3f" dependencies = [ "alsa", - "core-foundation-sys", "coreaudio-rs", "dasp_sample", "jni", "js-sys", "libc", "mach2", - "ndk 0.8.0", + "ndk", "ndk-context", - "oboe", + "num-derive", + "num-traits", + "objc2-audio-toolbox", + "objc2-core-audio", + "objc2-core-audio-types", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -1802,6 +1799,12 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "extended" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af9673d8203fcb076b19dfd17e38b3d4ae9f44959416ea532ce72415a6020365" + [[package]] name = "fastrand" version = "2.3.0" @@ -1905,7 +1908,7 @@ checksum = "b0299020c3ef3f60f526a4f64ab4a3d4ce116b1acbf24cdd22da0068e5d81dc3" dependencies = [ "fontconfig-parser", "log", - "memmap2 0.9.8", + "memmap2", "slotmap", "tinyvec", "ttf-parser 0.20.0", @@ -2657,13 +2660,13 @@ dependencies = [ [[package]] name = "idmap-derive" -version = "0.1.2" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3f44aa1b60e7de7e2833ad2cc3bc79880171d1e1efdb44ca833a1acf8102870" +checksum = "ac03bebb34669b3ef9c04ab65926ddf3513f5b5b74b45c540bf250829a1e92eb" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.106", ] [[package]] @@ -3006,7 +3009,7 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f56d8582a273a05076c57d5478faa51c39958744760938f2da770e890b43c62d" dependencies = [ - "bindgen 0.69.5", + "bindgen", "cmake", "convert_case 0.6.0", "dlopen2", @@ -3051,7 +3054,7 @@ name = "libspa-sys" version = "0.8.0" source = "git+https://gitlab.freedesktop.org/galister/pipewire-rs.git#ba32202c3c391004c3bb533b58fa75a50e47ff57" dependencies = [ - "bindgen 0.69.5", + "bindgen", "cc", "system-deps 6.2.2", ] @@ -3126,9 +3129,9 @@ dependencies = [ [[package]] name = "lru" -version = "0.14.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f8cc7106155f10bdf99a6f379688f543ad6596a415375b36a59a054ceda1198" +checksum = "bfe949189f46fabb938b3a9a0be30fdd93fd8a09260da863399a8cf3db756ec8" dependencies = [ "hashbrown 0.15.5", ] @@ -3167,15 +3170,6 @@ version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" -[[package]] -name = "memmap2" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" -dependencies = [ - "libc", -] - [[package]] name = "memmap2" version = "0.9.8" @@ -3258,20 +3252,6 @@ dependencies = [ "pxfm", ] -[[package]] -name = "ndk" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" -dependencies = [ - "bitflags 2.9.4", - "jni-sys", - "log", - "ndk-sys 0.5.0+25.2.9519653", - "num_enum", - "thiserror 1.0.69", -] - [[package]] name = "ndk" version = "0.9.0" @@ -3281,7 +3261,7 @@ dependencies = [ "bitflags 2.9.4", "jni-sys", "log", - "ndk-sys 0.6.0+11769913", + "ndk-sys", "num_enum", "raw-window-handle", "thiserror 1.0.69", @@ -3293,15 +3273,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" -[[package]] -name = "ndk-sys" -version = "0.5.0+25.2.9519653" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" -dependencies = [ - "jni-sys", -] - [[package]] name = "ndk-sys" version = "0.6.0+11769913" @@ -3515,6 +3486,21 @@ dependencies = [ "objc2-quartz-core 0.2.2", ] +[[package]] +name = "objc2-audio-toolbox" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10cbe18d879e20a4aea544f8befe38bcf52255eb63d3f23eca2842f3319e4c07" +dependencies = [ + "bitflags 2.9.4", + "libc", + "objc2 0.6.2", + "objc2-core-audio", + "objc2-core-audio-types", + "objc2-core-foundation", + "objc2-foundation 0.3.1", +] + [[package]] name = "objc2-cloud-kit" version = "0.2.2" @@ -3539,6 +3525,28 @@ dependencies = [ "objc2-foundation 0.2.2", ] +[[package]] +name = "objc2-core-audio" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca44961e888e19313b808f23497073e3f6b3c22bb485056674c8b49f3b025c82" +dependencies = [ + "dispatch2", + "objc2 0.6.2", + "objc2-core-audio-types", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-core-audio-types" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f1cc99bb07ad2ddb6527ddf83db6a15271bb036b3eb94b801cd44fdc666ee1" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.2", +] + [[package]] name = "objc2-core-data" version = "0.2.2" @@ -3751,29 +3759,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "oboe" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8b61bebd49e5d43f5f8cc7ee2891c16e0f41ec7954d36bcb6c14c5e0de867fb" -dependencies = [ - "jni", - "ndk 0.8.0", - "ndk-context", - "num-derive", - "num-traits", - "oboe-sys", -] - -[[package]] -name = "oboe-sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8bb09a4a2b1d668170cfe0a7d5bc103f8999fb316c98099b6a9939c9f2e79d" -dependencies = [ - "cc", -] - [[package]] name = "once_cell" version = "1.21.3" @@ -4099,7 +4084,7 @@ name = "pipewire-sys" version = "0.8.0" source = "git+https://gitlab.freedesktop.org/galister/pipewire-rs.git#ba32202c3c391004c3bb533b58fa75a50e47ff57" dependencies = [ - "bindgen 0.69.5", + "bindgen", "libspa-sys", "system-deps 6.2.2", ] @@ -4515,9 +4500,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.2" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" +checksum = "8b5288124840bee7b386bc413c487869b360b2b4ec421ea56425128692f2a82c" dependencies = [ "aho-corasick", "memchr", @@ -4527,9 +4512,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" +checksum = "833eb9ce86d40ef33cb1306d8accf7bc8ec2bfea4355cbdebb3df68b40925cad" dependencies = [ "aho-corasick", "memchr", @@ -4567,12 +4552,15 @@ dependencies = [ [[package]] name = "rodio" -version = "0.20.1" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ceb6607dd738c99bc8cb28eff249b7cd5c8ec88b9db96c0608c1480d140fb1" +checksum = "e40ecf59e742e03336be6a3d53755e789fd05a059fa22dfa0ed624722319e183" dependencies = [ "cpal", + "dasp_sample", "hound", + "num-rational", + "symphonia", ] [[package]] @@ -4783,8 +4771,8 @@ checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" dependencies = [ "ab_glyph", "log", - "memmap2 0.9.8", - "smithay-client-toolkit", + "memmap2", + "smithay-client-toolkit 0.19.2", "tiny-skia", ] @@ -5039,11 +5027,12 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "smithay" -version = "0.5.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497aa82b881bf392470c286b213e01f7aa30b2fb08857831f81c87b251ba4d89" +checksum = "740cea6927892bc182d5bf70c8f79806c8bc9f68f2fb96e55a30be171b63af98" dependencies = [ "appendlist", + "atomic_float", "bitflags 2.9.4", "calloop 0.14.3", "cgmath", @@ -5059,12 +5048,13 @@ dependencies = [ "libc", "libloading", "profiling", - "rand 0.8.5", - "rustix 0.38.44", + "rand 0.9.2", + "rustix 1.1.2", "scopeguard", + "sha2", "smallvec", "tempfile", - "thiserror 1.0.69", + "thiserror 2.0.16", "tracing", "wayland-protocols", "wayland-protocols-misc", @@ -5081,14 +5071,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ "bitflags 2.9.4", - "bytemuck", "calloop 0.13.0", - "calloop-wayland-source", + "calloop-wayland-source 0.3.0", "cursor-icon", "libc", "log", - "memmap2 0.9.8", - "pkg-config", + "memmap2", "rustix 0.38.44", "thiserror 1.0.69", "wayland-backend", @@ -5098,7 +5086,36 @@ dependencies = [ "wayland-protocols", "wayland-protocols-wlr", "wayland-scanner", - "xkbcommon 0.7.0", + "xkeysym", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0" +dependencies = [ + "bitflags 2.9.4", + "bytemuck", + "calloop 0.14.3", + "calloop-wayland-source 0.4.1", + "cursor-icon", + "libc", + "log", + "memmap2", + "pkg-config", + "rustix 1.1.2", + "thiserror 2.0.16", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-experimental", + "wayland-protocols-misc", + "wayland-protocols-wlr", + "wayland-scanner", + "xkbcommon 0.8.0", "xkeysym", ] @@ -5186,6 +5203,66 @@ dependencies = [ "zeno", ] +[[package]] +name = "symphonia" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "815c942ae7ee74737bb00f965fa5b5a2ac2ce7b6c01c0cc169bbeaf7abd5f5a9" +dependencies = [ + "lazy_static", + "symphonia-codec-pcm", + "symphonia-core", + "symphonia-format-riff", + "symphonia-metadata", +] + +[[package]] +name = "symphonia-codec-pcm" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f395a67057c2ebc5e84d7bb1be71cce1a7ba99f64e0f0f0e303a03f79116f89b" +dependencies = [ + "log", + "symphonia-core", +] + +[[package]] +name = "symphonia-core" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "798306779e3dc7d5231bd5691f5a813496dc79d3f56bf82e25789f2094e022c3" +dependencies = [ + "arrayvec", + "bitflags 1.3.2", + "bytemuck", + "lazy_static", + "log", +] + +[[package]] +name = "symphonia-format-riff" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f7be232f962f937f4b7115cbe62c330929345434c834359425e043bfd15f50" +dependencies = [ + "extended", + "log", + "symphonia-core", + "symphonia-metadata", +] + +[[package]] +name = "symphonia-metadata" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc622b9841a10089c5b18e99eb904f4341615d5aa55bbf4eedde1be721a4023c" +dependencies = [ + "encoding_rs", + "lazy_static", + "log", + "symphonia-core", +] + [[package]] name = "syn" version = "1.0.109" @@ -5230,9 +5307,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.35.2" +version = "0.37.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3ffa3e4ff2b324a57f7aeb3c349656c7b127c3c189520251a648102a92496e" +checksum = "3bddd368fda2f82ead69c03d46d351987cfa0c2a57abfa37a017f3aa3e9bf69a" dependencies = [ "libc", "memchr", @@ -6063,6 +6140,19 @@ dependencies = [ "wayland-server", ] +[[package]] +name = "wayland-protocols-experimental" +version = "20250721.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1" +dependencies = [ + "bitflags 2.9.4", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + [[package]] name = "wayland-protocols-misc" version = "0.3.9" @@ -6071,6 +6161,7 @@ checksum = "2dfe33d551eb8bffd03ff067a8b44bb963919157841a99957151299a6307d19c" dependencies = [ "bitflags 2.9.4", "wayland-backend", + "wayland-client", "wayland-protocols", "wayland-scanner", "wayland-server", @@ -6681,8 +6772,8 @@ dependencies = [ "dpi", "js-sys", "libc", - "memmap2 0.9.8", - "ndk 0.9.0", + "memmap2", + "ndk", "objc2 0.5.2", "objc2-app-kit", "objc2-foundation 0.2.2", @@ -6694,7 +6785,7 @@ dependencies = [ "redox_syscall 0.4.1", "rustix 0.38.44", "sctk-adwaita", - "smithay-client-toolkit", + "smithay-client-toolkit 0.19.2", "smol_str", "tracing", "unicode-segmentation", @@ -6747,7 +6838,7 @@ dependencies = [ "log", "pipewire", "rxscreen", - "smithay-client-toolkit", + "smithay-client-toolkit 0.20.0", "wayland-client", "wayland-protocols", ] @@ -6790,6 +6881,7 @@ dependencies = [ "serde_json", "serde_json5", "serde_yaml", + "slotmap", "smallvec", "smithay", "strum", @@ -6808,7 +6900,7 @@ dependencies = [ "wlx-capture", "xcb", "xdg 3.0.0", - "xkbcommon 0.8.0", + "xkbcommon 0.9.0", ] [[package]] @@ -6881,24 +6973,24 @@ checksum = "2fb433233f2df9344722454bc7e96465c9d03bff9d77c248f9e7523fe79585b5" [[package]] name = "xkbcommon" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13867d259930edc7091a6c41b4ce6eee464328c6ff9659b7e4c668ca20d4c91e" +checksum = "8d66ca9352cbd4eecbbc40871d8a11b4ac8107cfc528a6e14d7c19c69d0e1ac9" dependencies = [ "libc", - "memmap2 0.8.0", + "memmap2", "xkeysym", ] [[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 = [ "as-raw-xcb-connection", "libc", - "memmap2 0.9.8", + "memmap2", "xkeysym", ] diff --git a/Cargo.toml b/Cargo.toml index 9d5fcd0..9fe825c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,8 +16,11 @@ resolver = "3" [workspace.dependencies] anyhow = "1.0.100" glam = "0.30.7" +idmap = "0.2.2" log = "0.4.28" +regex = "1.11.3" rust-embed = "8.7.2" +slotmap = "1.0.7" vulkano = { version = "0.35.2", default-features = false, features = [ "macros", ] } diff --git a/wgui/Cargo.toml b/wgui/Cargo.toml index 29535d6..47c2a06 100644 --- a/wgui/Cargo.toml +++ b/wgui/Cargo.toml @@ -16,15 +16,15 @@ image = { version = "0.25.8", default-features = false, features = [ "webp", ] } log = { workspace = true } -lru = "0.14.0" +lru = "0.16.1" ouroboros = "0.18.5" parking_lot = "0.12.4" -regex = "1.11.2" +regex = { workspace = true } resvg = { version = "0.45.1", default-features = false } roxmltree = "0.20.0" rustc-hash = "2.1.1" serde_json = "1.0.145" -slotmap = "1.0.7" +slotmap = { workspace = true } smallvec = "1.15.1" taffy = "0.9.1" vulkano = { workspace = true } diff --git a/wlx-capture/Cargo.toml b/wlx-capture/Cargo.toml index 899c215..6c55915 100644 --- a/wlx-capture/Cargo.toml +++ b/wlx-capture/Cargo.toml @@ -25,11 +25,11 @@ xshm = ["dep:rxscreen"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ashpd = { version = "0.11.0", default-features = false, features = [ +ashpd = { version = "0.12.0", default-features = false, features = [ "async-std", ], optional = true } drm-fourcc = "2.2.0" -idmap = "0.2.22" +idmap = { workspace = true } libc = "0.2.175" log = { workspace = true } pipewire = { git = "https://gitlab.freedesktop.org/galister/pipewire-rs.git", ref = "ba32202c3c391004c3bb533b58fa75a50e47ff57", features = [ @@ -41,7 +41,7 @@ rxscreen = { version = "0.1.7", features = [ "xrandr", "mouse", ], optional = true } -smithay-client-toolkit = { version = "0.19.2", optional = true } +smithay-client-toolkit = { version = "0.20.0", optional = true } wayland-client = { workspace = true, optional = true } wayland-protocols = { version = "0.32.9", features = [ "wayland-client", diff --git a/wlx-capture/src/wayland.rs b/wlx-capture/src/wayland.rs index c1afccf..4b8df5b 100644 --- a/wlx-capture/src/wayland.rs +++ b/wlx-capture/src/wayland.rs @@ -19,15 +19,15 @@ use smithay_client_toolkit::reexports::{ pub use wayland_client; use wayland_client::{ - Connection, Dispatch, EventQueue, Proxy, QueueHandle, backend::WaylandError, - globals::{GlobalList, GlobalListContents, registry_queue_init}, + globals::{registry_queue_init, GlobalList, GlobalListContents}, protocol::{ wl_output::{self, Transform, WlOutput}, wl_registry::{self, WlRegistry}, wl_seat::WlSeat, wl_shm::WlShm, }, + Connection, Dispatch, EventQueue, Proxy, QueueHandle, }; use crate::frame; @@ -136,7 +136,7 @@ impl WlxClient { pub fn get_desktop_origin(&self) -> (i32, i32) { let mut origin = (i32::MAX, i32::MAX); - for output in self.outputs.values() { + for (_, output) in self.outputs.iter() { origin.0 = origin.0.min(output.logical_pos.0); origin.1 = origin.1.min(output.logical_pos.1); } @@ -146,7 +146,7 @@ impl WlxClient { /// Get the logical width and height of the desktop. pub fn get_desktop_extent(&self) -> (i32, i32) { let mut extent = (0, 0); - for output in self.outputs.values() { + for (_, output) in self.outputs.iter() { extent.0 = extent.0.max(output.logical_pos.0 + output.logical_size.0); extent.1 = extent.1.max(output.logical_pos.1 + output.logical_size.1); } diff --git a/wlx-overlay-s/Cargo.toml b/wlx-overlay-s/Cargo.toml index c1c9064..f34af82 100644 --- a/wlx-overlay-s/Cargo.toml +++ b/wlx-overlay-s/Cargo.toml @@ -30,8 +30,8 @@ ctrlc = { version = "3.5.0", features = ["termination"] } dbus = { version = "0.9.9" } futures = "0.3.31" glam = { workspace = true, features = ["mint", "serde"] } -idmap = { version = "0.2.22", features = ["serde"] } -idmap-derive = "0.1.2" +idmap = { workspace = true, features = ["serde"] } +idmap-derive = "0.2.2" input-linux = "0.7.1" json = { version = "0.12.4", optional = true } json5 = "0.4.1" @@ -45,8 +45,9 @@ ovr_overlay = { features = [ "ovr_input", "ovr_system", ], git = "https://github.com/galister/ovr_overlay_oyasumi", optional = true } -regex = "1.11.2" -rodio = { version = "0.20.1", default-features = false, features = [ +regex = { workspace = true } +rodio = { version = "0.21.1", default-features = false, features = [ + "playback", "wav", "hound", ] } @@ -54,9 +55,10 @@ rosc = { version = "0.11.4", optional = true } serde = { version = "1.0.225", features = ["derive", "rc"] } serde_json = "1.0.145" serde_yaml = "0.9.34" +slotmap = { workspace = true } smallvec = "1.15.1" strum = { version = "0.27.2", features = ["derive"] } -sysinfo = { version = "0.35" } +sysinfo = { version = "0.37" } thiserror = "2.0" wlx-capture = { path = "../wlx-capture" } libmonado = { version = "1.3.2", optional = true } @@ -64,7 +66,7 @@ winit = { version = "0.30.12", optional = true } xdg = "3.0" log-panics = { version = "2.1.0", features = ["with-backtrace"] } serde_json5 = "0.2.1" -xkbcommon = { version = "0.8.0" } +xkbcommon = { version = "0.9.0" } xcb = { version = "1.6.0", optional = true, features = [ "as-raw-xcb-connection", ] } @@ -82,7 +84,7 @@ wgui = { path = "../wgui" } #WayVR-only deps ################################ khronos-egl = { version = "6.0.0", features = ["static"], optional = true } -smithay = { version = "0.5.1", default-features = false, features = [ +smithay = { version = "0.7.0", default-features = false, features = [ "renderer_gl", "backend_egl", "backend_drm", diff --git a/wlx-overlay-s/src/backend/wayvr/display.rs b/wlx-overlay-s/src/backend/wayvr/display.rs index 29777f2..7aad9a7 100644 --- a/wlx-overlay-s/src/backend/wayvr/display.rs +++ b/wlx-overlay-s/src/backend/wayvr/display.rs @@ -2,13 +2,13 @@ use std::{cell::RefCell, rc::Rc, sync::Arc}; use smithay::{ backend::renderer::{ - Bind, Color32F, Frame, Renderer, element::{ + surface::{render_elements_from_surface_tree, WaylandSurfaceRenderElement}, Kind, - surface::{WaylandSurfaceRenderElement, render_elements_from_surface_tree}, }, - gles::{GlesRenderer, GlesTexture, ffi}, + gles::{ffi, GlesRenderer, GlesTexture}, utils::draw_render_elements, + Bind, Color32F, Frame, Renderer, }, input, utils::{Logical, Point, Rectangle, Size, Transform}, @@ -22,8 +22,8 @@ use crate::{ }; use super::{ - BlitMethod, WayVRSignal, client::WayVRCompositor, comp::send_frames_surface_tree, egl_data, - event_queue::SyncEventQueue, process, smithay_wrapper, time, window, + client::WayVRCompositor, comp::send_frames_surface_tree, egl_data, event_queue::SyncEventQueue, + process, smithay_wrapper, time, window, BlitMethod, WayVRSignal, }; fn generate_auth_key() -> String { @@ -308,7 +308,8 @@ impl Display { } pub fn tick_render(&mut self, renderer: &mut GlesRenderer, time_ms: u64) -> anyhow::Result<()> { - renderer.bind(self.gles_texture.clone())?; + let mut gles_texture = self.gles_texture.clone(); + let mut target = renderer.bind(&mut gles_texture)?; let size = Size::from((i32::from(self.width), i32::from(self.height))); let damage: Rectangle = Rectangle::from_size(size); @@ -337,7 +338,7 @@ impl Display { }) .collect(); - let mut frame = renderer.render(size, Transform::Normal)?; + let mut frame = renderer.render(&mut target, size, Transform::Normal)?; let clear_color = if self.displayed_windows.is_empty() { Color32F::new(0.5, 0.5, 0.5, 0.5) diff --git a/wlx-overlay-s/src/subsystem/audio.rs b/wlx-overlay-s/src/subsystem/audio.rs index 81e20d6..e5f77f7 100644 --- a/wlx-overlay-s/src/subsystem/audio.rs +++ b/wlx-overlay-s/src/subsystem/audio.rs @@ -1,9 +1,9 @@ use std::io::Cursor; -use rodio::{Decoder, OutputStream, OutputStreamHandle, Source}; +use rodio::{Decoder, OutputStreamBuilder, stream::OutputStream}; pub struct AudioOutput { - audio_stream: Option<(OutputStream, OutputStreamHandle)>, + audio_stream: Option, first_try: bool, } @@ -15,17 +15,17 @@ impl AudioOutput { } } - fn get_handle(&mut self) -> Option<&OutputStreamHandle> { + fn get_handle(&mut self) -> Option<&OutputStream> { if self.audio_stream.is_none() && self.first_try { self.first_try = false; - if let Ok((stream, handle)) = OutputStream::try_default() { - self.audio_stream = Some((stream, handle)); + if let Ok(stream) = OutputStreamBuilder::open_default_stream() { + self.audio_stream = Some(stream); } else { log::error!("Failed to open audio stream. Audio will not work."); return None; } } - self.audio_stream.as_ref().map(|(_, h)| h) + self.audio_stream.as_ref() } pub fn play(&mut self, wav_bytes: &'static [u8]) { @@ -40,6 +40,6 @@ impl AudioOutput { return; } }; - let _ = handle.play_raw(source.convert_samples()); + let _ = handle.mixer().add(source); } } diff --git a/wlx-overlay-s/src/subsystem/hid/mod.rs b/wlx-overlay-s/src/subsystem/hid/mod.rs index db102d3..f7f2906 100644 --- a/wlx-overlay-s/src/subsystem/hid/mod.rs +++ b/wlx-overlay-s/src/subsystem/hid/mod.rs @@ -1,5 +1,5 @@ use glam::{IVec2, Vec2}; -use idmap::{IdMap, idmap}; +use idmap::{idmap, IdMap}; use idmap_derive::IntegerId; use input_linux::{ AbsoluteAxis, AbsoluteInfo, AbsoluteInfoSetup, EventKind, InputId, Key, RelativeAxis,