diff --git a/Cargo.lock b/Cargo.lock index 10627f9f..22504908 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -218,8 +218,7 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atomicwrites" version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4d45f362125ed144544e57b0ec6de8fd6a296d41a6252fc4a20c0cf12e9ed3a" +source = "git+https://github.com/jackpot51/rust-atomicwrites#043ab4859d53ffd3d55334685303d8df39c9f768" dependencies = [ "rustix", "tempfile", @@ -399,8 +398,8 @@ checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" dependencies = [ "calloop", "rustix", - "wayland-backend 0.3.2", - "wayland-client 0.31.1", + "wayland-backend", + "wayland-client", ] [[package]] @@ -443,16 +442,16 @@ dependencies = [ [[package]] name = "cocoa" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" +checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" dependencies = [ "bitflags 1.3.2", "block", "cocoa-foundation", "core-foundation", - "core-graphics 0.22.3", - "foreign-types 0.3.2", + "core-graphics", + "foreign-types 0.5.0", "libc", "objc", ] @@ -528,19 +527,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" -[[package]] -name = "core-graphics" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-graphics-types", - "foreign-types 0.3.2", - "libc", -] - [[package]] name = "core-graphics" version = "0.23.1" @@ -610,8 +596,8 @@ dependencies = [ "tracing", "tracing-journald", "tracing-subscriber", - "wayland-backend 0.3.2", - "wayland-scanner 0.31.0", + "wayland-backend", + "wayland-scanner", "xcursor", "xdg", "xkbcommon", @@ -628,7 +614,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic/#42f24b7ee2cb5f715d137e61c6b7c4af3e27196a" +source = "git+https://github.com/pop-os/libcosmic/#57f4abb8a000c0e554c77807100025301599cf3f" dependencies = [ "atomicwrites", "calloop", @@ -643,7 +629,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic/#42f24b7ee2cb5f715d137e61c6b7c4af3e27196a" +source = "git+https://github.com/pop-os/libcosmic/#57f4abb8a000c0e554c77807100025301599cf3f" dependencies = [ "quote", "syn 1.0.109", @@ -655,9 +641,9 @@ version = "0.1.0" source = "git+https://github.com/pop-os/cosmic-protocols?branch=main#5faec87be0a1fd1d72e99431ac8e6647ff1dfd41" dependencies = [ "bitflags 2.4.1", - "wayland-backend 0.3.2", + "wayland-backend", "wayland-protocols", - "wayland-scanner 0.31.0", + "wayland-scanner", "wayland-server", ] @@ -684,7 +670,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic/#42f24b7ee2cb5f715d137e61c6b7c4af3e27196a" +source = "git+https://github.com/pop-os/libcosmic/#57f4abb8a000c0e554c77807100025301599cf3f" dependencies = [ "almost", "cosmic-config", @@ -788,6 +774,16 @@ dependencies = [ "serde", ] +[[package]] +name = "ctor" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37e366bff8cd32dd8754b0991fb66b279dc48f598c3a18914852a6673deef583" +dependencies = [ + "quote", + "syn 2.0.39", +] + [[package]] name = "cursor-icon" version = "1.1.0" @@ -978,21 +974,44 @@ checksum = "97fb1b703ffbc7ebd216eba7900008049a56ace55580ecb2ee7fa801e8d8be87" dependencies = [ "bitflags 2.4.1", "bytemuck", - "drm-ffi", + "drm-ffi 0.6.0", "drm-fourcc", "nix 0.27.1", ] +[[package]] +name = "drm" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e58eefd79f5173683872c0c82d0f05c2dc3c583d631259f60bb7a323756b7ff2" +dependencies = [ + "bitflags 2.4.1", + "bytemuck", + "drm-ffi 0.7.0", + "drm-fourcc", + "rustix", +] + [[package]] name = "drm-ffi" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba7d1c19c4b6270e89d59fb27dc6d02a317c658a8a54e54781e1db9b5947595d" dependencies = [ - "drm-sys", + "drm-sys 0.5.0", "nix 0.27.1", ] +[[package]] +name = "drm-ffi" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "220dd8c12ebf2b0cbaffa19e00de02f5f090d363fb900f16ea012c077eea1174" +dependencies = [ + "drm-sys 0.6.0", + "rustix", +] + [[package]] name = "drm-fourcc" version = "2.2.0" @@ -1005,6 +1024,16 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a4f1c0468062a56cd5705f1e3b5409eb286d5596a2028ec8e947595d7e715ae" +[[package]] +name = "drm-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5115283ec60c99da8a9e5dc3c55f27680211e974c948cb6f3b51f0373190503b" +dependencies = [ + "libc", + "linux-raw-sys 0.6.1", +] + [[package]] name = "ecolor" version = "0.23.0" @@ -1101,9 +1130,9 @@ dependencies = [ [[package]] name = "enum-map" -version = "2.7.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53337c2dbf26a3c31eccc73a37b10c1614e8d4ae99b6a50d553e8936423c1f16" +checksum = "09e6b4f374c071b18172e23134e01026653dc980636ee139e0dfe59c538c61e5" dependencies = [ "enum-map-derive", "serde", @@ -1111,9 +1140,9 @@ dependencies = [ [[package]] name = "enum-map-derive" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04d0b288e3bb1d861c4403c1774a6f7a798781dfc519b3647df2a3dd4ae95f25" +checksum = "bfdb3d73d1beaf47c8593a1364e577fde072677cbfd103600345c0f547408cc0" dependencies = [ "proc-macro2", "quote", @@ -1155,9 +1184,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" dependencies = [ "libc", "windows-sys 0.48.0", @@ -1165,9 +1194,9 @@ dependencies = [ [[package]] name = "etagere" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf70b9ea3a235a7432b4f481854815e2d4fb2fe824c1f5fb09b8985dd06b3e9" +checksum = "306960881d6c46bd0dd6b7f07442a441418c08d0d3e63d8d080b0f64c6343e4e" dependencies = [ "euclid", "svg_fmt", @@ -1204,15 +1233,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1" -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fastrand" version = "2.0.1" @@ -1295,7 +1315,7 @@ dependencies = [ "intl-memoizer", "intl_pluralrules", "rustc-hash", - "self_cell", + "self_cell 0.10.3", "smallvec", "unic-langid", ] @@ -1535,24 +1555,24 @@ dependencies = [ [[package]] name = "gbm" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c97c1672f2d951da311cd20b148794c4157a8879c7650e65f76c7826e2b1c1" +checksum = "65dffaf38d96aa22cb748ccd9b1ffe624931e899f54c0225815ef7ac757a409f" dependencies = [ "bitflags 1.3.2", - "drm", + "drm 0.11.0", "drm-fourcc", "gbm-sys", "libc", - "wayland-backend 0.3.2", + "wayland-backend", "wayland-server", ] [[package]] name = "gbm-sys" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63eba9b9b7a231514482deb08759301c9f9f049ac6869403f381834ebfeaf67" +checksum = "6fd2d6bf7c0143b38beece05f9a5c4c851a49a8434f62bf58ff28da92b0ddc58" dependencies = [ "libc", ] @@ -1567,16 +1587,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "gethostname" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "gethostname" version = "0.3.0" @@ -1589,9 +1599,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "js-sys", @@ -1806,7 +1816,7 @@ dependencies = [ "serde", "serde_derive", "thiserror", - "toml 0.8.6", + "toml 0.8.8", "unic-langid", ] @@ -1869,7 +1879,7 @@ dependencies = [ [[package]] name = "iced" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic/#42f24b7ee2cb5f715d137e61c6b7c4af3e27196a" +source = "git+https://github.com/pop-os/libcosmic/#57f4abb8a000c0e554c77807100025301599cf3f" dependencies = [ "iced_core", "iced_futures", @@ -1882,12 +1892,13 @@ dependencies = [ [[package]] name = "iced_core" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic/#42f24b7ee2cb5f715d137e61c6b7c4af3e27196a" +source = "git+https://github.com/pop-os/libcosmic/#57f4abb8a000c0e554c77807100025301599cf3f" dependencies = [ "bitflags 1.3.2", "instant", "log", "palette", + "serde", "thiserror", "twox-hash", ] @@ -1895,7 +1906,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic/#42f24b7ee2cb5f715d137e61c6b7c4af3e27196a" +source = "git+https://github.com/pop-os/libcosmic/#57f4abb8a000c0e554c77807100025301599cf3f" dependencies = [ "futures", "iced_core", @@ -1907,7 +1918,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic/#42f24b7ee2cb5f715d137e61c6b7c4af3e27196a" +source = "git+https://github.com/pop-os/libcosmic/#57f4abb8a000c0e554c77807100025301599cf3f" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -1925,7 +1936,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic/#42f24b7ee2cb5f715d137e61c6b7c4af3e27196a" +source = "git+https://github.com/pop-os/libcosmic/#57f4abb8a000c0e554c77807100025301599cf3f" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -1938,7 +1949,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.1.1" -source = "git+https://github.com/pop-os/libcosmic/#42f24b7ee2cb5f715d137e61c6b7c4af3e27196a" +source = "git+https://github.com/pop-os/libcosmic/#57f4abb8a000c0e554c77807100025301599cf3f" dependencies = [ "iced_core", "iced_futures", @@ -1948,7 +1959,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic/#42f24b7ee2cb5f715d137e61c6b7c4af3e27196a" +source = "git+https://github.com/pop-os/libcosmic/#57f4abb8a000c0e554c77807100025301599cf3f" dependencies = [ "iced_core", "once_cell", @@ -1958,7 +1969,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic/#42f24b7ee2cb5f715d137e61c6b7c4af3e27196a" +source = "git+https://github.com/pop-os/libcosmic/#57f4abb8a000c0e554c77807100025301599cf3f" dependencies = [ "bytemuck", "cosmic-text", @@ -1976,7 +1987,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.11.1" -source = "git+https://github.com/pop-os/libcosmic/#42f24b7ee2cb5f715d137e61c6b7c4af3e27196a" +source = "git+https://github.com/pop-os/libcosmic/#57f4abb8a000c0e554c77807100025301599cf3f" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -1998,7 +2009,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.1.3" -source = "git+https://github.com/pop-os/libcosmic/#42f24b7ee2cb5f715d137e61c6b7c4af3e27196a" +source = "git+https://github.com/pop-os/libcosmic/#57f4abb8a000c0e554c77807100025301599cf3f" dependencies = [ "iced_renderer", "iced_runtime", @@ -2334,7 +2345,7 @@ checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic/#42f24b7ee2cb5f715d137e61c6b7c4af3e27196a" +source = "git+https://github.com/pop-os/libcosmic/#57f4abb8a000c0e554c77807100025301599cf3f" dependencies = [ "apply", "cosmic-config", @@ -2431,14 +2442,14 @@ dependencies = [ [[package]] name = "libsystemd" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88b9597a67aa1c81a6624603e6bd0bcefb9e0f94c9c54970ec53771082104b4e" +checksum = "c592dc396b464005f78a5853555b9f240bc5378bf5221acc4e129910b2678869" dependencies = [ "hmac", "libc", "log", - "nix 0.26.4", + "nix 0.27.1", "nom", "once_cell", "serde", @@ -2459,9 +2470,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" + +[[package]] +name = "linux-raw-sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da4a7ec558fa3b65e4c69b6af8df01fb9ad51ac69262335e1505276bc091935d" [[package]] name = "locale_config" @@ -2523,9 +2540,9 @@ dependencies = [ [[package]] name = "lyon_algorithms" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00a0349cd8f0270781bb93a824b63df6178e3b4a27794e7be3ce3763f5a44d6e" +checksum = "a3bca95f9a4955b3e4a821fbbcd5edfbd9be2a9a50bb5758173e5358bfb4c623" dependencies = [ "lyon_path", "num-traits", @@ -2782,19 +2799,6 @@ dependencies = [ "jni-sys", ] -[[package]] -name = "nix" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.6.5", -] - [[package]] name = "nix" version = "0.26.4" @@ -2805,7 +2809,6 @@ dependencies = [ "cfg-if", "libc", "memoffset 0.7.1", - "pin-utils", ] [[package]] @@ -2817,6 +2820,7 @@ dependencies = [ "bitflags 2.4.1", "cfg-if", "libc", + "memoffset 0.9.0", ] [[package]] @@ -3330,7 +3334,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" dependencies = [ - "toml_edit", + "toml_edit 0.20.7", ] [[package]] @@ -3426,15 +3430,6 @@ dependencies = [ "bytemuck", ] -[[package]] -name = "quick-xml" -version = "0.28.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1" -dependencies = [ - "memchr", -] - [[package]] name = "quick-xml" version = "0.30.0" @@ -3764,14 +3759,14 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.38.21" +version = "0.38.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" +checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" dependencies = [ "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys", + "linux-raw-sys 0.4.11", "windows-sys 0.48.0", ] @@ -3843,9 +3838,18 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "self_cell" -version = "0.10.2" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14e4d63b804dc0c7ec4a1e52bcb63f02c7ac94476755aa579edac21e01f915d" +dependencies = [ + "self_cell 1.0.2", +] + +[[package]] +name = "self_cell" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ef965a420fe14fdac7dd018862966a4c14094f900e1650bbc71ddd7d580c8af" +checksum = "e388332cd64eb80cd595a00941baf513caffae8dce9cfd0467fc9c66397dade6" [[package]] name = "sendfd" @@ -3858,18 +3862,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", @@ -3957,14 +3961,14 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "smithay" version = "0.3.0" -source = "git+https://github.com/smithay//smithay?rev=d5b352b#d5b352b33525d21b38ad8d7ebd54c99d39246464" +source = "git+https://github.com/smithay//smithay?rev=bb2aacd#bb2aacdc754f7a264e16375914b949cc8032d787" dependencies = [ "appendlist", "ash", @@ -3974,8 +3978,8 @@ dependencies = [ "cgmath", "cursor-icon", "downcast-rs", - "drm", - "drm-ffi", + "drm 0.11.0", + "drm-ffi 0.7.0", "drm-fourcc", "encoding_rs", "errno", @@ -3988,7 +3992,6 @@ dependencies = [ "libc", "libloading 0.8.1", "libseat", - "nix 0.27.1", "once_cell", "pkg-config", "profiling", @@ -4001,15 +4004,15 @@ dependencies = [ "thiserror", "tracing", "udev 0.8.0", - "wayland-backend 0.3.2", + "wayland-backend", "wayland-egl", "wayland-protocols", "wayland-protocols-misc", "wayland-protocols-wlr", "wayland-server", - "wayland-sys 0.31.1", + "wayland-sys", "winit", - "x11rb 0.12.0", + "x11rb", "xkbcommon", ] @@ -4028,13 +4031,13 @@ dependencies = [ "memmap2 0.9.0", "rustix", "thiserror", - "wayland-backend 0.3.2", - "wayland-client 0.31.1", + "wayland-backend", + "wayland-client", "wayland-csd-frame", "wayland-cursor", "wayland-protocols", "wayland-protocols-wlr", - "wayland-scanner 0.31.0", + "wayland-scanner", "xkeysym", ] @@ -4071,29 +4074,32 @@ checksum = "27207bb65232eda1f588cf46db2fee75c0808d557f6b3cf19a75f5d6d7c94df1" [[package]] name = "softbuffer" -version = "0.2.0" -source = "git+https://github.com/pop-os/softbuffer?tag=cosmic-2.0-old#ece901a9f60dc89ca740dc3bd11f3c909e801723" +version = "0.3.3" +source = "git+https://github.com/pop-os/softbuffer?tag=v0.3-cosmic#6f0371ccece51d124c6c5d37082189df0dc5f9ba" dependencies = [ + "as-raw-xcb-connection", "bytemuck", "cfg_aliases", "cocoa", - "core-graphics 0.22.3", - "fastrand 1.9.0", - "foreign-types 0.3.2", + "core-graphics", + "drm 0.10.0", + "fastrand", + "foreign-types 0.5.0", + "js-sys", "log", - "nix 0.26.4", + "memmap2 0.9.0", "objc", "raw-window-handle 0.5.2", - "redox_syscall 0.3.5", - "thiserror", + "redox_syscall 0.4.1", + "rustix", + "tiny-xlib", "wasm-bindgen", - "wayland-backend 0.1.2", - "wayland-client 0.30.2", - "wayland-sys 0.30.1", + "wayland-backend", + "wayland-client", + "wayland-sys", "web-sys", - "windows-sys 0.42.0", - "x11-dl", - "x11rb 0.11.1", + "windows-sys 0.48.0", + "x11rb", ] [[package]] @@ -4226,7 +4232,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", - "fastrand 2.0.1", + "fastrand", "redox_syscall 0.4.1", "rustix", "windows-sys 0.48.0", @@ -4234,9 +4240,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] @@ -4362,11 +4368,23 @@ dependencies = [ "strict-num", ] +[[package]] +name = "tiny-xlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4098d49269baa034a8d1eae9bd63e9fa532148d772121dace3bcd6a6c98eb6d" +dependencies = [ + "as-raw-xcb-connection", + "ctor", + "libloading 0.8.1", + "tracing", +] + [[package]] name = "tinystr" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d0e245e80bdc9b4e5356fc45a72184abbc3861992603f515270e9340f5a219" +checksum = "83c02bf3c538ab32ba913408224323915f4ef9a6d61c0e85d493f355921c0ece" dependencies = [ "displaydoc", ] @@ -4397,14 +4415,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff9e3abce27ee2c9a37f9ad37238c1bdd4e789c84ba37df76aa4d528f5072cc" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.21.0", ] [[package]] @@ -4421,6 +4439,17 @@ name = "toml_edit" version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ "indexmap 2.1.0", "serde", @@ -4474,9 +4503,9 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.4" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ "log", "once_cell", @@ -4485,9 +4514,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", @@ -4765,9 +4794,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" dependencies = [ "serde", ] @@ -4887,21 +4916,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "wayland-backend" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b48e27457e8da3b2260ac60d0a94512f5cba36448679f3747c0865b7893ed8" -dependencies = [ - "cc", - "downcast-rs", - "io-lifetimes 1.0.11", - "nix 0.26.4", - "scoped-tls", - "smallvec", - "wayland-sys 0.30.1", -] - [[package]] name = "wayland-backend" version = "0.3.2" @@ -4913,19 +4927,7 @@ dependencies = [ "nix 0.26.4", "scoped-tls", "smallvec", - "wayland-sys 0.31.1", -] - -[[package]] -name = "wayland-client" -version = "0.30.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489c9654770f674fc7e266b3c579f4053d7551df0ceb392f153adb1f9ed06ac8" -dependencies = [ - "bitflags 1.3.2", - "nix 0.26.4", - "wayland-backend 0.1.2", - "wayland-scanner 0.30.1", + "wayland-sys", ] [[package]] @@ -4936,8 +4938,8 @@ checksum = "1ca7d52347346f5473bf2f56705f360e8440873052e575e55890c4fa57843ed3" dependencies = [ "bitflags 2.4.1", "nix 0.26.4", - "wayland-backend 0.3.2", - "wayland-scanner 0.31.0", + "wayland-backend", + "wayland-scanner", ] [[package]] @@ -4948,7 +4950,7 @@ checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ "bitflags 2.4.1", "cursor-icon", - "wayland-backend 0.3.2", + "wayland-backend", ] [[package]] @@ -4958,7 +4960,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44aa20ae986659d6c77d64d808a046996a932aa763913864dc40c359ef7ad5b" dependencies = [ "nix 0.26.4", - "wayland-client 0.31.1", + "wayland-client", "xcursor", ] @@ -4968,8 +4970,8 @@ version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "355f652e5a24ae02d2ad536c8fc2d3dcc6c2bd635027cd6103a193e7d75eeda2" dependencies = [ - "wayland-backend 0.3.2", - "wayland-sys 0.31.1", + "wayland-backend", + "wayland-sys", ] [[package]] @@ -4979,9 +4981,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e253d7107ba913923dc253967f35e8561a3c65f914543e46843c88ddd729e21c" dependencies = [ "bitflags 2.4.1", - "wayland-backend 0.3.2", - "wayland-client 0.31.1", - "wayland-scanner 0.31.0", + "wayland-backend", + "wayland-client", + "wayland-scanner", "wayland-server", ] @@ -4992,9 +4994,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa5933740b200188c9b4c38601b8212e8c154d7de0d2cb171944e137a77de1e" dependencies = [ "bitflags 2.4.1", - "wayland-backend 0.3.2", + "wayland-backend", "wayland-protocols", - "wayland-scanner 0.31.0", + "wayland-scanner", "wayland-server", ] @@ -5005,10 +5007,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" dependencies = [ "bitflags 2.4.1", - "wayland-backend 0.3.2", - "wayland-client 0.31.1", + "wayland-backend", + "wayland-client", "wayland-protocols", - "wayland-scanner 0.31.0", + "wayland-scanner", ] [[package]] @@ -5018,24 +5020,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" dependencies = [ "bitflags 2.4.1", - "wayland-backend 0.3.2", - "wayland-client 0.31.1", + "wayland-backend", + "wayland-client", "wayland-protocols", - "wayland-scanner 0.31.0", + "wayland-scanner", "wayland-server", ] -[[package]] -name = "wayland-scanner" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9b873b257fbc32ec909c0eb80dea312076a67014e65e245f5eb69a6b8ab330e" -dependencies = [ - "proc-macro2", - "quick-xml 0.28.2", - "quote", -] - [[package]] name = "wayland-scanner" version = "0.31.0" @@ -5043,7 +5034,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb8e28403665c9f9513202b7e1ed71ec56fde5c107816843fb14057910b2c09c" dependencies = [ "proc-macro2", - "quick-xml 0.30.0", + "quick-xml", "quote", ] @@ -5057,20 +5048,8 @@ dependencies = [ "downcast-rs", "io-lifetimes 2.0.2", "nix 0.26.4", - "wayland-backend 0.3.2", - "wayland-scanner 0.31.0", -] - -[[package]] -name = "wayland-sys" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b2a02ac608e07132978689a6f9bf4214949c85998c247abadd4f4129b1aa06" -dependencies = [ - "dlib", - "lazy_static", - "log", - "pkg-config", + "wayland-backend", + "wayland-scanner", ] [[package]] @@ -5268,21 +5247,6 @@ dependencies = [ "windows-targets 0.42.2", ] -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-sys" version = "0.45.0" @@ -5429,7 +5393,7 @@ dependencies = [ "calloop", "cfg_aliases", "core-foundation", - "core-graphics 0.23.1", + "core-graphics", "cursor-icon", "icrate", "js-sys", @@ -5450,15 +5414,15 @@ dependencies = [ "unicode-segmentation", "wasm-bindgen", "wasm-bindgen-futures", - "wayland-backend 0.3.2", - "wayland-client 0.31.1", + "wayland-backend", + "wayland-client", "wayland-protocols", "wayland-protocols-plasma", "web-sys", "web-time", "windows-sys 0.48.0", "x11-dl", - "x11rb 0.12.0", + "x11rb", "xkbcommon-dl", ] @@ -5491,22 +5455,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "x11rb" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf3c79412dd91bae7a7366b8ad1565a85e35dd049affc3a6a2c549e97419617" -dependencies = [ - "gethostname 0.2.3", - "libc", - "libloading 0.7.4", - "nix 0.25.1", - "once_cell", - "winapi", - "winapi-wsapoll", - "x11rb-protocol 0.11.1", -] - [[package]] name = "x11rb" version = "0.12.0" @@ -5514,23 +5462,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a" dependencies = [ "as-raw-xcb-connection", - "gethostname 0.3.0", + "gethostname", "libc", "libloading 0.7.4", "nix 0.26.4", "once_cell", "winapi", "winapi-wsapoll", - "x11rb-protocol 0.12.0", -] - -[[package]] -name = "x11rb-protocol" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0b1513b141123073ce54d5bb1d33f801f17508fbd61e02060b1214e96d39c56" -dependencies = [ - "nix 0.25.1", + "x11rb-protocol", ] [[package]] @@ -5619,18 +5558,18 @@ checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697" [[package]] name = "zerocopy" -version = "0.7.25" +version = "0.7.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd369a67c0edfef15010f980c3cbe45d7f651deac2cd67ce097cd801de16557" +checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.25" +version = "0.7.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b" +checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index ad54e88d..b240d2dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ xkbcommon = "0.7" indexmap = "2.0" xdg = "^2.1" ron = "0.8" -libsystemd = { version = "0.6", optional = true } +libsystemd = { version = "0.7", optional = true } wayland-backend = "0.3.2" wayland-scanner = "0.31.0" cosmic-comp-config = { path = "cosmic-comp-config" } @@ -88,4 +88,4 @@ debug = true lto = "fat" [patch."https://github.com/Smithay/smithay.git"] -smithay = { git = "https://github.com/smithay//smithay", rev = "d5b352b" } \ No newline at end of file +smithay = { git = "https://github.com/smithay//smithay", rev = "bb2aacd" } diff --git a/src/state.rs b/src/state.rs index 2bb9639b..b32368fa 100644 --- a/src/state.rs +++ b/src/state.rs @@ -30,6 +30,7 @@ use rust_embed::RustEmbed; use smithay::utils::Rectangle; use smithay::{ backend::{ + allocator::dmabuf::Dmabuf, drm::DrmNode, input::Device, renderer::{ @@ -38,6 +39,7 @@ use smithay::{ RenderElementStates, }, glow::GlowRenderer, + ImportDma, }, }, desktop::utils::{ @@ -60,7 +62,7 @@ use smithay::{ utils::{Clock, IsAlive, Monotonic}, wayland::{ compositor::{CompositorClientState, CompositorState}, - dmabuf::{DmabufFeedback, DmabufState}, + dmabuf::{DmabufFeedback, DmabufGlobal, DmabufState}, fractional_scale::{with_fractional_scale, FractionalScaleManagerState}, input_method::InputMethodManagerState, keyboard_shortcuts_inhibit::KeyboardShortcutsInhibitState, @@ -274,6 +276,24 @@ impl BackendData { _ => unreachable!("No backend was initialized"), } } + + pub fn dmabuf_imported( + &mut self, + global: &DmabufGlobal, + dmabuf: Dmabuf, + ) -> Result<(), anyhow::Error> { + match self { + BackendData::Kms(ref mut state) => state.dmabuf_imported(global, dmabuf)?, + BackendData::Winit(ref mut state) => { + state.backend.renderer().import_dmabuf(&dmabuf, None)?; + } + BackendData::X11(ref mut state) => { + state.renderer.import_dmabuf(&dmabuf, None)?; + } + _ => unreachable!("No backend set when importing dmabuf"), + } + Ok(()) + } } pub fn client_has_no_security_context(client: &Client) -> bool { diff --git a/src/wayland/handlers/dmabuf.rs b/src/wayland/handlers/dmabuf.rs index 16f4a0cb..9b1b3191 100644 --- a/src/wayland/handlers/dmabuf.rs +++ b/src/wayland/handlers/dmabuf.rs @@ -1,10 +1,10 @@ // SPDX-License-Identifier: GPL-3.0-only -use crate::state::{BackendData, State}; +use crate::state::State; use smithay::{ - backend::{allocator::dmabuf::Dmabuf, renderer::ImportDma}, + backend::allocator::dmabuf::Dmabuf, delegate_dmabuf, - wayland::dmabuf::{DmabufGlobal, DmabufHandler, DmabufState, ImportError}, + wayland::dmabuf::{DmabufGlobal, DmabufHandler, DmabufState, ImportNotifier}, }; impl DmabufHandler for State { @@ -16,23 +16,10 @@ impl DmabufHandler for State { &mut self, global: &DmabufGlobal, dmabuf: Dmabuf, - ) -> Result<(), ImportError> { - match &mut self.backend { - BackendData::Kms(ref mut state) => state - .dmabuf_imported(global, dmabuf) - .map_err(|_| ImportError::Failed), - BackendData::Winit(ref mut state) => state - .backend - .renderer() - .import_dmabuf(&dmabuf, None) - .map(|_| ()) - .map_err(|_| ImportError::Failed), - BackendData::X11(ref mut state) => state - .renderer - .import_dmabuf(&dmabuf, None) - .map(|_| ()) - .map_err(|_| ImportError::Failed), - _ => unreachable!("No backend set when importing dmabuf"), + import_notifier: ImportNotifier, + ) { + if self.backend.dmabuf_imported(global, dmabuf).is_err() { + import_notifier.failed(); } } } diff --git a/src/wayland/handlers/drm.rs b/src/wayland/handlers/drm.rs new file mode 100644 index 00000000..90c5596d --- /dev/null +++ b/src/wayland/handlers/drm.rs @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-3.0-only + +use crate::{ + state::State, + wayland::protocols::drm::{DrmHandler, ImportError}, +}; +use smithay::{backend::allocator::dmabuf::Dmabuf, wayland::dmabuf::DmabufGlobal}; + +impl DrmHandler for State { + fn dmabuf_imported( + &mut self, + global: &DmabufGlobal, + dmabuf: Dmabuf, + ) -> Result<(), ImportError> { + self.backend + .dmabuf_imported(global, dmabuf) + .map_err(|_| ImportError::Failed) + } +} diff --git a/src/wayland/handlers/mod.rs b/src/wayland/handlers/mod.rs index dbfb5cb0..23ae737b 100644 --- a/src/wayland/handlers/mod.rs +++ b/src/wayland/handlers/mod.rs @@ -6,6 +6,7 @@ pub mod data_control; pub mod data_device; pub mod decoration; pub mod dmabuf; +pub mod drm; pub mod drm_lease; pub mod fractional_scale; pub mod input_method; diff --git a/src/wayland/protocols/drm.rs b/src/wayland/protocols/drm.rs index 40bf651f..c5c5ec98 100644 --- a/src/wayland/protocols/drm.rs +++ b/src/wayland/protocols/drm.rs @@ -31,13 +31,23 @@ use smithay::{ }, wayland::{ buffer::BufferHandler, - dmabuf::{DmabufGlobal, DmabufHandler, ImportError}, + dmabuf::{DmabufGlobal, DmabufHandler}, }, }; use tracing::trace; use std::{convert::TryFrom, path::PathBuf, sync::Arc}; +pub enum ImportError { + Failed, + InvalidFormat, +} + +pub trait DrmHandler { + fn dmabuf_imported(&mut self, global: &DmabufGlobal, dmabuf: Dmabuf) + -> Result<(), ImportError>; +} + #[derive(Debug)] pub struct WlDrmState; @@ -98,7 +108,7 @@ where + Dispatch + Dispatch + BufferHandler - + DmabufHandler + + DrmHandler + 'static, { fn request( @@ -163,7 +173,7 @@ where match dma.build() { Some(dmabuf) => { match state.dmabuf_imported(&data.dmabuf_global, dmabuf.clone()) { - Ok(_) => { + Ok(()) => { // import was successful data_init.init(id, dmabuf); trace!("Created a new validated dma wl_buffer via wl_drm.");