diff --git a/Cargo.lock b/Cargo.lock index ad675b6..01c028b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -62,9 +62,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -87,6 +87,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3aa2999eb46af81abb65c2d30d446778d7e613b60bbf4e174a027e80f90a3c14" +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -146,9 +152,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.80" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "apply" @@ -167,9 +173,9 @@ dependencies = [ [[package]] name = "arc-swap" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b3d0060af21e8d11a926981cc00c6c1541aa91dd64b9f881985c3da1094425f" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "arrayref" @@ -280,8 +286,8 @@ dependencies = [ "async-lock 3.3.0", "async-task", "concurrent-queue", - "fastrand 2.0.1", - "futures-lite 2.2.0", + "fastrand 2.0.2", + "futures-lite 2.3.0", "slab", ] @@ -319,18 +325,18 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" +checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" dependencies = [ "async-lock 3.3.0", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.2.0", + "futures-lite 2.3.0", "parking", - "polling 3.5.0", - "rustix 0.38.31", + "polling 3.6.0", + "rustix 0.38.32", "slab", "tracing", "windows-sys 0.52.0", @@ -369,7 +375,7 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.31", + "rustix 0.38.32", "windows-sys 0.48.0", ] @@ -380,26 +386,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "451e3cf68011bd56771c79db04a9e333095ab6349f7e47592b788e9b98720cc8" dependencies = [ "async-channel", - "async-io 2.3.1", + "async-io 2.3.2", "async-lock 3.3.0", "async-signal", "blocking", "cfg-if", "event-listener 5.2.0", - "futures-lite 2.2.0", - "rustix 0.38.31", + "futures-lite 2.3.0", + "rustix 0.38.32", "windows-sys 0.52.0", ] [[package]] name = "async-recursion" -version = "1.0.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -408,13 +414,13 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" dependencies = [ - "async-io 2.3.1", + "async-io 2.3.2", "async-lock 2.8.0", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.31", + "rustix 0.38.32", "signal-hook-registry", "slab", "windows-sys 0.48.0", @@ -428,13 +434,13 @@ checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -460,7 +466,7 @@ name = "atomicwrites" version = "0.4.2" source = "git+https://github.com/jackpot51/rust-atomicwrites#043ab4859d53ffd3d55334685303d8df39c9f768" dependencies = [ - "rustix 0.38.31", + "rustix 0.38.32", "tempfile", "windows-sys 0.48.0", ] @@ -521,9 +527,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -569,9 +575,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" dependencies = [ "serde", ] @@ -600,37 +606,37 @@ dependencies = [ "async-channel", "async-lock 3.3.0", "async-task", - "fastrand 2.0.1", + "fastrand 2.0.2", "futures-io", - "futures-lite 2.2.0", + "futures-lite 2.3.0", "piper", "tracing", ] [[package]] name = "bumpalo" -version = "3.15.3" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "bytemuck" -version = "1.14.3" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" +checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" +checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -641,9 +647,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cairo-sys-rs" @@ -661,10 +667,10 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "log", - "polling 3.5.0", - "rustix 0.38.31", + "polling 3.6.0", + "rustix 0.38.32", "slab", "thiserror", ] @@ -676,10 +682,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ "async-task", - "bitflags 2.4.2", + "bitflags 2.5.0", "log", - "polling 3.5.0", - "rustix 0.38.31", + "polling 3.6.0", + "rustix 0.38.32", "slab", "thiserror", ] @@ -691,7 +697,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" dependencies = [ "calloop 0.12.4", - "rustix 0.38.31", + "rustix 0.38.32", "wayland-backend", "wayland-client", ] @@ -703,16 +709,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" dependencies = [ "calloop 0.13.0", - "rustix 0.38.31", + "rustix 0.38.32", "wayland-backend", "wayland-client", ] [[package]] name = "cc" -version = "1.0.89" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0ba8f7aaa012f30d5b2861462f6708eccd49c3c39863fe083a308035f63d723" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" [[package]] name = "cfg-expr" @@ -742,11 +748,25 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77e53693616d3075149f4ead59bdeecd204ac6b8192d8969757601b74bddf00f" +[[package]] +name = "chrono" +version = "0.4.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-targets 0.52.4", +] + [[package]] name = "clap" -version = "4.5.1" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" +checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" dependencies = [ "clap_builder", "clap_derive", @@ -754,9 +774,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.1" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -766,14 +786,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.0" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" +checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -782,6 +802,43 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +[[package]] +name = "clipboard-win" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d517d4b86184dbb111d3556a10f1c8a04da7428d2987bf1081602bf11c3aa9ee" +dependencies = [ + "error-code", +] + +[[package]] +name = "clipboard_macos" +version = "0.1.0" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#f65a6c303bbbd6c7bf88f9bc34421ec06d893bea" +dependencies = [ + "objc", + "objc-foundation", + "objc_id", +] + +[[package]] +name = "clipboard_wayland" +version = "0.2.2" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#f65a6c303bbbd6c7bf88f9bc34421ec06d893bea" +dependencies = [ + "mime", + "smithay-clipboard", +] + +[[package]] +name = "clipboard_x11" +version = "0.4.2" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#f65a6c303bbbd6c7bf88f9bc34421ec06d893bea" +dependencies = [ + "thiserror", + "x11rb", +] + [[package]] name = "cocoa" version = "0.25.0" @@ -937,17 +994,18 @@ dependencies = [ [[package]] name = "cosmic-client-toolkit" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-protocols?rev=e65fa5e#e65fa5e2bb47e51656221657049bd3f88ae9dae5" +source = "git+https://github.com/pop-os/cosmic-protocols?rev=1cc4a13#1cc4a1393d0f8be4d444666e260fdb811b400f49" dependencies = [ "cosmic-protocols", - "smithay-client-toolkit", + "libc", + "smithay-client-toolkit 0.18.0", "wayland-client", ] [[package]] name = "cosmic-comp-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-comp#a8846ed2b893579b86cb0073553537dade74a44c" +source = "git+https://github.com/pop-os/cosmic-comp#b40d1538092d3055103bb7ab54ecf5574fcfdf4f" dependencies = [ "cosmic-config", "input", @@ -957,7 +1015,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#801c502c36c4c7d3b6cfa7f41f34f2c093877030" +source = "git+https://github.com/pop-os/libcosmic#8afd6490da67704abf9480692abfe33b0780c9c9" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -974,7 +1032,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#801c502c36c4c7d3b6cfa7f41f34f2c093877030" +source = "git+https://github.com/pop-os/libcosmic#8afd6490da67704abf9480692abfe33b0780c9c9" dependencies = [ "quote", "syn 1.0.109", @@ -983,9 +1041,9 @@ dependencies = [ [[package]] name = "cosmic-protocols" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-protocols?rev=e65fa5e#e65fa5e2bb47e51656221657049bd3f88ae9dae5" +source = "git+https://github.com/pop-os/cosmic-protocols?rev=1cc4a13#1cc4a1393d0f8be4d444666e260fdb811b400f49" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -996,9 +1054,9 @@ dependencies = [ [[package]] name = "cosmic-text" version = "0.11.2" -source = "git+https://github.com/pop-os/cosmic-text.git#a53a0b3a8c085143470a9d26ac2c2911cc479033" +source = "git+https://github.com/pop-os/cosmic-text.git#ff5501d9a36e51c50d908413caf7632d8f7533b7" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "fontdb", "libm", "log", @@ -1018,15 +1076,17 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#801c502c36c4c7d3b6cfa7f41f34f2c093877030" +source = "git+https://github.com/pop-os/libcosmic#8afd6490da67704abf9480692abfe33b0780c9c9" dependencies = [ "almost", "cosmic-config", "csscolorparser", + "dirs 5.0.1", "lazy_static", "palette", "ron", "serde", + "thiserror", ] [[package]] @@ -1053,7 +1113,7 @@ dependencies = [ "memmap2 0.9.4", "once_cell", "rust-embed", - "rustix 0.38.31", + "rustix 0.38.32", "tokio", "wayland-protocols", "zbus 4.1.2", @@ -1150,7 +1210,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad291aa74992b9b7a7e88c38acbbf6ad7e107f1d90ee8775b7bc1fc3394f485c" dependencies = [ "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -1164,8 +1224,8 @@ name = "d3d12" version = "0.19.0" source = "git+https://github.com/gfx-rs/wgpu?rev=20fda69#20fda698341efbdc870b8027d6d49f5bf3f36109" dependencies = [ - "bitflags 2.4.2", - "libloading 0.8.2", + "bitflags 2.5.0", + "libloading 0.8.3", "winapi", ] @@ -1190,7 +1250,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -1201,7 +1261,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -1231,7 +1291,7 @@ checksum = "4e018fccbeeb50ff26562ece792ed06659b9c2dae79ece77c4456bb10d9bf79b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -1254,7 +1314,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -1322,7 +1382,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -1331,7 +1391,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.8.2", + "libloading 0.8.3", ] [[package]] @@ -1355,11 +1415,11 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0f8a69e60d75ae7dab4ef26a59ca99f2a89d4c142089b537775ae0c198bdcde" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "bytemuck", "drm-ffi", "drm-fourcc", - "rustix 0.38.31", + "rustix 0.38.32", ] [[package]] @@ -1369,7 +1429,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41334f8405792483e32ad05fbb9c5680ff4e84491883d2947a4757dc54cb2ac6" dependencies = [ "drm-sys", - "rustix 0.38.31", + "rustix 0.38.32", ] [[package]] @@ -1429,7 +1489,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -1471,6 +1531,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "error-code" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0474425d51df81997e2f90a21591180b38eccf27292d755f3e30750225c175b" + [[package]] name = "etagere" version = "0.2.10" @@ -1582,9 +1648,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "fdeflate" @@ -1702,9 +1768,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "font-types" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd7f3ea17572640b606b35df42cfb6ecdf003704b062580e59918692190b73d" +checksum = "5b7f6040d337bd44434ab21fc6509154edf2cece88b23758d9d64654c4e7730b" [[package]] name = "fontconfig-parser" @@ -1747,7 +1813,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -1777,9 +1843,9 @@ dependencies = [ [[package]] name = "freedesktop-desktop-entry" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45157175a725e81f3f594382430b6b78af5f8f72db9bd51b94f0785f80fc6d29" +checksum = "287f89b1a3d88dd04d2b65dfec39f3c381efbcded7b736456039c4ee49d54b17" dependencies = [ "dirs 3.0.2", "gettext-rs", @@ -1876,11 +1942,11 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.0.1", + "fastrand 2.0.2", "futures-core", "futures-io", "parking", @@ -1895,7 +1961,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -2148,7 +2214,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "gpu-alloc-types", ] @@ -2158,7 +2224,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", ] [[package]] @@ -2180,7 +2246,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "gpu-descriptor-types", "hashbrown", ] @@ -2191,7 +2257,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", ] [[package]] @@ -2254,10 +2320,10 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "com", "libc", - "libloading 0.8.2", + "libloading 0.8.3", "thiserror", "widestring", "winapi", @@ -2269,6 +2335,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.9" @@ -2303,7 +2375,7 @@ dependencies = [ "serde", "serde_derive", "thiserror", - "toml 0.8.10", + "toml 0.8.12", "unic-langid", ] @@ -2346,7 +2418,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.52", + "syn 2.0.55", "unic-langid", ] @@ -2360,13 +2432,36 @@ dependencies = [ "i18n-config", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", ] [[package]] name = "iced" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#801c502c36c4c7d3b6cfa7f41f34f2c093877030" +source = "git+https://github.com/pop-os/libcosmic#8afd6490da67704abf9480692abfe33b0780c9c9" dependencies = [ "iced_accessibility", "iced_core", @@ -2376,12 +2471,13 @@ dependencies = [ "iced_widget", "image", "thiserror", + "window_clipboard", ] [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#801c502c36c4c7d3b6cfa7f41f34f2c093877030" +source = "git+https://github.com/pop-os/libcosmic#8afd6490da67704abf9480692abfe33b0780c9c9" dependencies = [ "accesskit", "accesskit_unix", @@ -2390,7 +2486,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#801c502c36c4c7d3b6cfa7f41f34f2c093877030" +source = "git+https://github.com/pop-os/libcosmic#8afd6490da67704abf9480692abfe33b0780c9c9" dependencies = [ "bitflags 1.3.2", "iced_accessibility", @@ -2399,17 +2495,18 @@ dependencies = [ "palette", "raw-window-handle 0.6.0", "serde", - "smithay-client-toolkit", + "smithay-client-toolkit 0.18.0", "smol_str", "thiserror", "web-time", + "window_clipboard", "xxhash-rust", ] [[package]] name = "iced_futures" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#801c502c36c4c7d3b6cfa7f41f34f2c093877030" +source = "git+https://github.com/pop-os/libcosmic#8afd6490da67704abf9480692abfe33b0780c9c9" dependencies = [ "futures", "iced_core", @@ -2422,7 +2519,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#801c502c36c4c7d3b6cfa7f41f34f2c093877030" +source = "git+https://github.com/pop-os/libcosmic#8afd6490da67704abf9480692abfe33b0780c9c9" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2446,7 +2543,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#801c502c36c4c7d3b6cfa7f41f34f2c093877030" +source = "git+https://github.com/pop-os/libcosmic#8afd6490da67704abf9480692abfe33b0780c9c9" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2458,19 +2555,20 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#801c502c36c4c7d3b6cfa7f41f34f2c093877030" +source = "git+https://github.com/pop-os/libcosmic#8afd6490da67704abf9480692abfe33b0780c9c9" dependencies = [ "iced_accessibility", "iced_core", "iced_futures", - "smithay-client-toolkit", + "smithay-client-toolkit 0.18.0", "thiserror", + "window_clipboard", ] [[package]] name = "iced_sctk" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#801c502c36c4c7d3b6cfa7f41f34f2c093877030" +source = "git+https://github.com/pop-os/libcosmic#8afd6490da67704abf9480692abfe33b0780c9c9" dependencies = [ "enum-repr", "float-cmp", @@ -2482,11 +2580,12 @@ dependencies = [ "itertools", "lazy_static", "raw-window-handle 0.6.0", - "smithay-client-toolkit", + "smithay-client-toolkit 0.18.0", "thiserror", "tracing", "wayland-backend", "wayland-protocols", + "window_clipboard", "xkbcommon", "xkbcommon-dl", "xkeysym", @@ -2495,7 +2594,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#801c502c36c4c7d3b6cfa7f41f34f2c093877030" +source = "git+https://github.com/pop-os/libcosmic#8afd6490da67704abf9480692abfe33b0780c9c9" dependencies = [ "iced_core", "once_cell", @@ -2505,7 +2604,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#801c502c36c4c7d3b6cfa7f41f34f2c093877030" +source = "git+https://github.com/pop-os/libcosmic#8afd6490da67704abf9480692abfe33b0780c9c9" dependencies = [ "bytemuck", "cosmic-text", @@ -2522,7 +2621,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#801c502c36c4c7d3b6cfa7f41f34f2c093877030" +source = "git+https://github.com/pop-os/libcosmic#8afd6490da67704abf9480692abfe33b0780c9c9" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2541,14 +2640,14 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#801c502c36c4c7d3b6cfa7f41f34f2c093877030" +source = "git+https://github.com/pop-os/libcosmic#8afd6490da67704abf9480692abfe33b0780c9c9" dependencies = [ "iced_renderer", "iced_runtime", "iced_style", "num-traits", "ouroboros", - "smithay-client-toolkit", + "smithay-client-toolkit 0.18.0", "thiserror", "unicode-segmentation", ] @@ -2595,9 +2694,9 @@ checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" [[package]] name = "indexmap" -version = "2.2.5" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown", @@ -2629,7 +2728,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7911ce3db9c10c5ab4a35c49af778a5f9a827bd0f7371d9be56175d8dd2740d0" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "input-sys", "io-lifetimes 1.0.11", "libc", @@ -2731,7 +2830,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", - "libloading 0.8.2", + "libloading 0.8.3", "pkg-config", ] @@ -2800,10 +2899,11 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#801c502c36c4c7d3b6cfa7f41f34f2c093877030" +source = "git+https://github.com/pop-os/libcosmic#8afd6490da67704abf9480692abfe33b0780c9c9" dependencies = [ "apply", "ashpd 0.7.0", + "chrono", "cosmic-client-toolkit", "cosmic-config", "cosmic-theme", @@ -2848,9 +2948,9 @@ dependencies = [ [[package]] name = "libloading" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2caa5afb8bf9f3a2652760ce7d4f62d21c4d5a423e68466fca30df82f2330164" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", "windows-targets 0.52.4", @@ -2868,7 +2968,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "libc", "redox_syscall 0.4.1", ] @@ -3048,7 +3148,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "block", "core-graphics-types", "foreign-types", @@ -3057,6 +3157,14 @@ dependencies = [ "paste", ] +[[package]] +name = "mime" +version = "0.1.0" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#f65a6c303bbbd6c7bf88f9bc34421ec06d893bea" +dependencies = [ + "smithay-clipboard", +] + [[package]] name = "miniz_oxide" version = "0.7.2" @@ -3092,7 +3200,7 @@ source = "git+https://github.com/gfx-rs/wgpu?rev=20fda69#20fda698341efbdc870b802 dependencies = [ "arrayvec", "bit-set", - "bitflags 2.4.2", + "bitflags 2.5.0", "codespan-reporting", "hexf-parse", "indexmap", @@ -3123,7 +3231,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "cfg_aliases 0.1.1", "libc", @@ -3136,7 +3244,7 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "crossbeam-channel", "filetime", "fsevent-sys", @@ -3332,11 +3440,11 @@ version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec4c6225c69b4ca778c0aea097321a64c421cf4577b331c61b229267edabb6f8" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -3360,7 +3468,7 @@ checksum = "e8890702dbec0bad9116041ae586f84805b13eecd1d8b1df27c29998a9969d6d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -3471,7 +3579,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -3508,7 +3616,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" dependencies = [ "atomic-waker", - "fastrand 2.0.1", + "fastrand 2.0.2", "futures-io", ] @@ -3549,14 +3657,15 @@ dependencies = [ [[package]] name = "polling" -version = "3.5.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9" +checksum = "e0c976a60b2d7e99d6f229e414670a9b85d13ac305cc6d1e9c134de58c5aaaf6" dependencies = [ "cfg-if", "concurrent-queue", + "hermit-abi", "pin-project-lite", - "rustix 0.38.31", + "rustix 0.38.32", "tracing", "windows-sys 0.52.0", ] @@ -3618,9 +3727,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -3714,9 +3823,9 @@ checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544" [[package]] name = "rayon" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -3740,9 +3849,9 @@ checksum = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f" [[package]] name = "read-fonts" -version = "0.15.6" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea23eedb4d938031b6d4343222444608727a6aa68ec355e13588d9947ffe92" +checksum = "81c524658d3b77930a391f559756d91dbe829ab6cf4687083f615d395df99722" dependencies = [ "font-types", ] @@ -3778,9 +3887,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", @@ -3868,7 +3977,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64", - "bitflags 2.4.2", + "bitflags 2.5.0", "serde", "serde_derive", ] @@ -3899,7 +4008,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.52", + "syn 2.0.55", "walkdir", ] @@ -3951,11 +4060,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys 0.4.13", @@ -3968,7 +4077,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0ae5692c5beaad6a9e22830deeed7874eae8a4e3ba4076fb48e12c56856222c" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "bytemuck", "libm", "smallvec", @@ -4032,7 +4141,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -4043,7 +4152,7 @@ checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -4127,16 +4236,16 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smithay-client-toolkit" version = "0.18.0" source = "git+https://github.com/smithay/client-toolkit?rev=2e9bf9f#2e9bf9f31698851ca373e5f1e7ba3e6e804e4db1" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "bytemuck", "calloop 0.12.4", "calloop-wayland-source 0.2.0", @@ -4145,7 +4254,7 @@ dependencies = [ "log", "memmap2 0.9.4", "pkg-config", - "rustix 0.38.31", + "rustix 0.38.32", "thiserror", "wayland-backend", "wayland-client", @@ -4158,6 +4267,41 @@ dependencies = [ "xkeysym", ] +[[package]] +name = "smithay-client-toolkit" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" +dependencies = [ + "bitflags 2.5.0", + "calloop 0.12.4", + "calloop-wayland-source 0.2.0", + "cursor-icon", + "libc", + "log", + "memmap2 0.9.4", + "rustix 0.38.32", + "thiserror", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-clipboard" +version = "0.8.0" +source = "git+https://github.com/pop-os/smithay-clipboard?tag=pop-mime-types#cc0101c1f9ccc937a413bd3af3c0f6217f27e935" +dependencies = [ + "libc", + "smithay-client-toolkit 0.18.1", + "wayland-backend", +] + [[package]] name = "smol_str" version = "0.2.1" @@ -4198,7 +4342,7 @@ dependencies = [ "cocoa", "core-graphics", "drm", - "fastrand 2.0.1", + "fastrand 2.0.2", "foreign-types", "js-sys", "log", @@ -4206,7 +4350,7 @@ dependencies = [ "objc", "raw-window-handle 0.6.0", "redox_syscall 0.4.1", - "rustix 0.38.31", + "rustix 0.38.32", "tiny-xlib", "wasm-bindgen", "wayland-backend", @@ -4232,7 +4376,7 @@ version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", ] [[package]] @@ -4264,9 +4408,9 @@ checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "svg_fmt" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb1df15f412ee2e9dfc1c504260fa695c1c3f10fe9f4a6ee2d2184d7d6450e2" +checksum = "f83ba502a3265efb76efb89b0a2f7782ad6f2675015d4ce37e4b547dda42b499" [[package]] name = "svgtypes" @@ -4280,9 +4424,9 @@ dependencies = [ [[package]] name = "swash" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06ff4664af8923625604261c645f5c4cc610cc83c84bec74b50d76237089de7" +checksum = "9af636fb90d39858650cae1088a37e2862dab4e874a0bb49d6dfb5b2dacf0e24" dependencies = [ "read-fonts", "yazi", @@ -4302,9 +4446,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "002a1b3dbf967edfafc32655d0f377ab0bb7b994aa1d32c8cc7e9b8bf3ebb8f0" dependencies = [ "proc-macro2", "quote", @@ -4322,14 +4466,14 @@ dependencies = [ [[package]] name = "system-deps" -version = "6.2.0" +version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2d580ff6a20c55dfb86be5f9c238f67835d0e81cbdea8bf5680e0897320331" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" dependencies = [ "cfg-expr", - "heck", + "heck 0.5.0", "pkg-config", - "toml 0.8.10", + "toml 0.8.12", "version-compare", ] @@ -4352,9 +4496,9 @@ checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "temp-dir" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd16aa9ffe15fe021c6ee3766772132c6e98dfa395a167e16864f61a9cfb71d6" +checksum = "1f227968ec00f0e5322f9b8173c7a0cbcff6181a0a5b28e9892491c286277231" [[package]] name = "tempfile" @@ -4363,8 +4507,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand 2.0.1", - "rustix 0.38.31", + "fastrand 2.0.2", + "rustix 0.38.32", "windows-sys 0.52.0", ] @@ -4379,22 +4523,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -4451,7 +4595,7 @@ checksum = "d4098d49269baa034a8d1eae9bd63e9fa532148d772121dace3bcd6a6c98eb6d" dependencies = [ "as-raw-xcb-connection", "ctor", - "libloading 0.8.2", + "libloading 0.8.3", "tracing", ] @@ -4508,14 +4652,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.10" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.6", + "toml_edit 0.22.9", ] [[package]] @@ -4551,9 +4695,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.6" +version = "0.22.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" +checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" dependencies = [ "indexmap", "serde", @@ -4581,7 +4725,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -4812,9 +4956,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "version-compare" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" +checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" [[package]] name = "version_check" @@ -4865,7 +5009,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", "wasm-bindgen-shared", ] @@ -4899,7 +5043,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4933,7 +5077,7 @@ checksum = "9d50fa61ce90d76474c87f5fc002828d81b32677340112b4ef08079a9d459a40" dependencies = [ "cc", "downcast-rs", - "rustix 0.38.31", + "rustix 0.38.32", "scoped-tls", "smallvec", "wayland-sys", @@ -4945,8 +5089,8 @@ version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f" dependencies = [ - "bitflags 2.4.2", - "rustix 0.38.31", + "bitflags 2.5.0", + "rustix 0.38.32", "wayland-backend", "wayland-scanner", ] @@ -4957,7 +5101,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cursor-icon", "wayland-backend", ] @@ -4968,7 +5112,7 @@ version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71ce5fa868dd13d11a0d04c5e2e65726d0897be8de247c0c5a65886e283231ba" dependencies = [ - "rustix 0.38.31", + "rustix 0.38.32", "wayland-client", "xcursor", ] @@ -4979,7 +5123,7 @@ version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "wayland-backend", "wayland-client", "wayland-scanner", @@ -4992,7 +5136,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -5016,10 +5160,10 @@ version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00e6e4d5c285bc24ba4ed2d5a4bd4febd5fd904451f465973225c8e99772fdb7" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "downcast-rs", "io-lifetimes 2.0.3", - "rustix 0.38.31", + "rustix 0.38.32", "wayland-backend", "wayland-scanner", ] @@ -5095,7 +5239,7 @@ source = "git+https://github.com/gfx-rs/wgpu?rev=20fda69#20fda698341efbdc870b802 dependencies = [ "arrayvec", "bit-vec", - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg_aliases 0.1.1", "codespan-reporting", "indexmap", @@ -5122,7 +5266,7 @@ dependencies = [ "arrayvec", "ash", "bit-set", - "bitflags 2.4.2", + "bitflags 2.5.0", "block", "cfg_aliases 0.1.1", "core-graphics-types", @@ -5136,7 +5280,7 @@ dependencies = [ "js-sys", "khronos-egl", "libc", - "libloading 0.8.2", + "libloading 0.8.3", "log", "metal", "naga", @@ -5161,7 +5305,7 @@ name = "wgpu-types" version = "0.19.0" source = "git+https://github.com/gfx-rs/wgpu?rev=20fda69#20fda698341efbdc870b8027d6d49f5bf3f36109" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "js-sys", "web-sys", ] @@ -5203,6 +5347,20 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "window_clipboard" +version = "0.4.1" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#f65a6c303bbbd6c7bf88f9bc34421ec06d893bea" +dependencies = [ + "clipboard-win", + "clipboard_macos", + "clipboard_wayland", + "clipboard_x11", + "mime", + "raw-window-handle 0.6.0", + "thiserror", +] + [[package]] name = "windows" version = "0.52.0" @@ -5381,9 +5539,9 @@ dependencies = [ "as-raw-xcb-connection", "gethostname", "libc", - "libloading 0.8.2", + "libloading 0.8.3", "once_cell", - "rustix 0.38.31", + "rustix 0.38.32", "x11rb-protocol", ] @@ -5432,7 +5590,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "dlib", "log", "once_cell", @@ -5621,7 +5779,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] diff --git a/src/view/mod.rs b/src/view/mod.rs index 59548e7..76d5410 100644 --- a/src/view/mod.rs +++ b/src/view/mod.rs @@ -55,13 +55,13 @@ pub(crate) fn layer_surface<'a>( layout, ); let container = match layout { - WorkspaceLayout::Vertical => widget::cosmic_container::container( + WorkspaceLayout::Vertical => widget::layer_container( row![sidebar, toplevels] .spacing(12) .height(iced::Length::Fill) .width(iced::Length::Fill), ), - WorkspaceLayout::Horizontal => widget::cosmic_container::container( + WorkspaceLayout::Horizontal => widget::layer_container( column![sidebar, toplevels] .spacing(12) .height(iced::Length::Fill) diff --git a/src/wayland/buffer.rs b/src/wayland/buffer.rs index ff0af03..8af08a5 100644 --- a/src/wayland/buffer.rs +++ b/src/wayland/buffer.rs @@ -1,6 +1,5 @@ use cctk::{ - cosmic_protocols::screencopy::v1::client::zcosmic_screencopy_session_v1::BufferType, - screencopy::BufferInfo, + screencopy::Formats, wayland_client::{ protocol::{wl_buffer, wl_shm, wl_shm_pool}, Connection, Dispatch, QueueHandle, WEnum, @@ -68,34 +67,30 @@ fn create_memfile() -> rustix::io::Result { pub struct Buffer { pub backing: Arc, pub buffer: wl_buffer::WlBuffer, - pub buffer_info: BufferInfo, node: Option, + pub size: (u32, u32), } impl AppData { - fn create_shm_buffer(&self, buffer_info: &BufferInfo) -> Buffer { + fn create_shm_buffer(&self, format: u32, (width, height): (u32, u32)) -> Buffer { let fd = create_memfile().unwrap(); // XXX? - rustix::fs::ftruncate(&fd, buffer_info.stride as u64 * buffer_info.height as u64).unwrap(); + rustix::fs::ftruncate(&fd, width as u64 * height as u64 * 4).unwrap(); let pool = self.shm_state.wl_shm().create_pool( fd.as_fd(), - buffer_info.stride as i32 * buffer_info.height as i32, + width as i32 * height as i32 * 4, &self.qh, (), ); pool.destroy(); - // XXX - let fd = rustix::fs::memfd_create("shm-buffer", rustix::fs::MemfdFlags::CLOEXEC).unwrap(); - rustix::fs::ftruncate(&fd, buffer_info.stride as u64 * buffer_info.height as u64).unwrap(); - - let format = wl_shm::Format::try_from(buffer_info.format).unwrap(); + let format = wl_shm::Format::try_from(format).unwrap(); let buffer = pool.create_buffer( 0, - buffer_info.width as i32, - buffer_info.height as i32, - buffer_info.stride as i32, + width as i32, + height as i32, + width as i32 * 4, format, &self.qh, (), @@ -106,23 +101,24 @@ impl AppData { Shmbuf { fd, offset: 0, - width: buffer_info.width as i32, - height: buffer_info.height as i32, - stride: buffer_info.stride as i32, + width: width as i32, + height: height as i32, + stride: width as i32 * 4, format, } .into(), ), buffer, - buffer_info: buffer_info.clone(), node: None, + size: (width, height), } } #[allow(dead_code)] fn create_gbm_buffer( &self, - buffer_info: &BufferInfo, + format: u32, + (width, height): (u32, u32), needs_linear: bool, ) -> anyhow::Result> { let (Some((node, gbm)), Some(feedback)) = @@ -138,7 +134,7 @@ impl AppData { .flat_map(|x| &x.formats) .filter_map(|x| formats.get(*x as usize)) .filter(|x| { - x.format == buffer_info.format + x.format == format && (!needs_linear || x.modifier == u64::from(gbm::Modifier::Linear)) }) .filter_map(|x| gbm::Modifier::try_from(x.modifier).ok()) @@ -147,21 +143,21 @@ impl AppData { if modifiers.is_empty() { return Ok(None); }; - let format = gbm::Format::try_from(buffer_info.format)?; + let gbm_format = gbm::Format::try_from(format)?; //dbg!(format, modifiers); let bo = if !modifiers.iter().all(|x| *x == gbm::Modifier::Invalid) { gbm.create_buffer_object_with_modifiers::<()>( - buffer_info.width, - buffer_info.height, - format, + width, + height, + gbm_format, modifiers.iter().copied(), )? } else { // TODO make sure this isn't used across different GPUs gbm.create_buffer_object::<()>( - buffer_info.width, - buffer_info.height, - format, + width, + height, + gbm_format, gbm::BufferObjectFlags::empty(), )? }; @@ -190,9 +186,9 @@ impl AppData { } let buffer = params .create_immed( - buffer_info.width as i32, - buffer_info.height as i32, - buffer_info.format, + width as i32, + height as i32, + format, zwp_linux_buffer_params_v1::Flags::empty(), &self.qh, ) @@ -201,29 +197,26 @@ impl AppData { Ok(Some(Buffer { backing: Arc::new( Dmabuf { - width: buffer_info.width as i32, - height: buffer_info.height as i32, + width: width as i32, + height: height as i32, planes, - format: buffer_info.format, + format, modifier: modifier.into(), } .into(), ), buffer, - buffer_info: buffer_info.clone(), node: Some(node.clone()), + size: (width, height), })) } - pub fn create_buffer(&self, buffer_infos: &[BufferInfo]) -> Buffer { + pub fn create_buffer(&self, formats: &Formats) -> Buffer { // XXX Handle other formats? - let format = wl_shm::Format::Abgr8888.into(); + let format = u32::from(wl_shm::Format::Abgr8888); - if let Some(buffer_info) = buffer_infos - .iter() - .find(|x| x.type_ == WEnum::Value(BufferType::Dmabuf) && x.format == format) - { - match self.create_gbm_buffer(buffer_info, false) { + if let Some((_, modifiers)) = formats.dmabuf_formats.iter().find(|(f, _)| *f == format) { + match self.create_gbm_buffer(format, formats.buffer_size, false) { Ok(Some(buffer)) => { return buffer; } @@ -234,11 +227,8 @@ impl AppData { // Fallback to shm buffer // Assume format is already known to be valid - let buffer_info = buffer_infos - .iter() - .find(|x| x.type_ == WEnum::Value(BufferType::WlShm) && x.format == format) - .unwrap(); - self.create_shm_buffer(buffer_info) + assert!(formats.shm_formats.contains(&format)); + self.create_shm_buffer(format, formats.buffer_size) } } diff --git a/src/wayland/capture.rs b/src/wayland/capture.rs index 5a45b64..4edf7b3 100644 --- a/src/wayland/capture.rs +++ b/src/wayland/capture.rs @@ -1,9 +1,10 @@ use cctk::{ cosmic_protocols::{ - screencopy::v1::client::{zcosmic_screencopy_manager_v1, zcosmic_screencopy_session_v1}, + screencopy::v2::client::{zcosmic_screencopy_manager_v2, zcosmic_screencopy_session_v2}, toplevel_info::v1::client::zcosmic_toplevel_handle_v1, workspace::v1::client::zcosmic_workspace_handle_v1, }, + screencopy::ScreencopyState, wayland_client::{protocol::wl_output, Proxy, QueueHandle}, }; use cosmic::cctk; @@ -43,20 +44,16 @@ impl Capture { // Returns `None` if capture is destroyed // (or if `session` wasn't created with `SessionData`) pub fn for_session( - session: &zcosmic_screencopy_session_v1::ZcosmicScreencopySessionV1, + session: &zcosmic_screencopy_session_v2::ZcosmicScreencopySessionV2, ) -> Option> { session.data::()?.capture.upgrade() } // Start capturing frames - pub fn start( - self: &Arc, - manager: &zcosmic_screencopy_manager_v1::ZcosmicScreencopyManagerV1, - qh: &QueueHandle, - ) { + pub fn start(self: &Arc, screencopy_state: &ScreencopyState, qh: &QueueHandle) { let mut session = self.session.lock().unwrap(); if session.is_none() { - *session = Some(ScreencopySession::new(self, manager, qh)); + *session = Some(ScreencopySession::new(self, screencopy_state, qh)); } } diff --git a/src/wayland/mod.rs b/src/wayland/mod.rs index 8888702..6468265 100644 --- a/src/wayland/mod.rs +++ b/src/wayland/mod.rs @@ -152,7 +152,7 @@ impl AppData { for (source, capture) in self.captures.borrow_mut().iter_mut() { let matches = self.matches_capture_filter(source); if matches { - capture.start(&self.screencopy_state.screencopy_manager, &self.qh); + capture.start(&self.screencopy_state, &self.qh); } else { capture.stop(); } @@ -167,7 +167,7 @@ impl AppData { let matches = self.matches_capture_filter(&source); let capture = Capture::new(source); if matches { - capture.start(&self.screencopy_state.screencopy_manager, &self.qh); + capture.start(&self.screencopy_state, &self.qh); } capture }); diff --git a/src/wayland/screencopy.rs b/src/wayland/screencopy.rs index 2daf1cd..9f21d88 100644 --- a/src/wayland/screencopy.rs +++ b/src/wayland/screencopy.rs @@ -1,13 +1,20 @@ use cosmic::cctk::{ self, - cosmic_protocols::screencopy::v1::client::{ - zcosmic_screencopy_manager_v1, zcosmic_screencopy_session_v1, + cosmic_protocols::{ + image_source::v1::client::{ + zcosmic_toplevel_image_source_manager_v1::ZcosmicToplevelImageSourceManagerV1, + zcosmic_workspace_image_source_manager_v1::ZcosmicWorkspaceImageSourceManagerV1, + }, + screencopy::v2::client::{ + zcosmic_screencopy_frame_v2, zcosmic_screencopy_manager_v2, + zcosmic_screencopy_session_v2, + }, }, screencopy::{ - BufferInfo, ScreencopyHandler, ScreencopySessionData, ScreencopySessionDataExt, - ScreencopyState, + capture, Formats, Frame, ScreencopyFrameData, ScreencopyFrameDataExt, ScreencopyHandler, + ScreencopySessionData, ScreencopySessionDataExt, ScreencopyState, }, - wayland_client::{Connection, QueueHandle, WEnum}, + wayland_client::{Connection, Proxy, QueueHandle, WEnum}, }; use cosmic::iced_sctk::subsurface_widget::{SubsurfaceBuffer, SubsurfaceBufferRelease}; use std::{ @@ -20,8 +27,7 @@ use super::{AppData, Buffer, Capture, CaptureImage, CaptureSource, Event}; pub struct ScreencopySession { // swapchain buffers buffers: Option<[Buffer; 2]>, - session: zcosmic_screencopy_session_v1::ZcosmicScreencopySessionV1, - first_frame: bool, + session: zcosmic_screencopy_session_v2::ZcosmicScreencopySessionV2, // Future signaled when buffer is signaled. // if triple buffer is used, will need more than one. release: Option, @@ -30,55 +36,69 @@ pub struct ScreencopySession { impl ScreencopySession { pub fn new( capture: &Arc, - manager: &zcosmic_screencopy_manager_v1::ZcosmicScreencopyManagerV1, + screencopy_state: &ScreencopyState, qh: &QueueHandle, ) -> Self { + let image_source = match &capture.source { + CaptureSource::Toplevel(toplevel) => screencopy_state + .toplevel_source_manager + .as_ref() + .unwrap() + .create_source(toplevel, qh, ()), + CaptureSource::Workspace(workspace, output) => screencopy_state + .workspace_source_manager + .as_ref() + .unwrap() + .create_source( + workspace, + // output, + qh, + (), + ), + }; + let udata = SessionData { session_data: Default::default(), capture: Arc::downgrade(capture), }; - let session = match &capture.source { - CaptureSource::Toplevel(toplevel) => manager.capture_toplevel( - toplevel, - zcosmic_screencopy_manager_v1::CursorMode::Hidden, - qh, - udata, - ), - CaptureSource::Workspace(workspace, output) => manager.capture_workspace( - workspace, - output, - zcosmic_screencopy_manager_v1::CursorMode::Hidden, - qh, - udata, - ), - }; + let session = screencopy_state.screencopy_manager.create_session( + &image_source, + zcosmic_screencopy_manager_v2::Options::empty(), + qh, + udata, + ); Self { buffers: None, session, - first_frame: true, release: None, } } - fn attach_buffer_and_commit(&mut self, _capture: &Capture, conn: &Connection) { + fn attach_buffer_and_commit( + &mut self, + _capture: &Capture, + conn: &Connection, + qh: &QueueHandle, + ) { let Some(back) = self.buffers.as_ref().map(|x| &x[1]) else { return; }; - let node = back.node().and_then(|x| x.to_str().map(|x| x.to_string())); - - self.session.attach_buffer(&back.buffer, node, 0); // XXX age? - if self.first_frame { - self.session - .commit(zcosmic_screencopy_session_v1::Options::empty()); - self.first_frame = false; - } else { - // TODO Not updating properly if `Options::OnDamage` is used - self.session - .commit(zcosmic_screencopy_session_v1::Options::empty()); - } + // TODO + // let node = back.node().and_then(|x| x.to_str().map(|x| x.to_string())); + + capture( + &self.session, + &back.buffer, + &[], + qh, + FrameData { + frame_data: Default::default(), + session: self.session.clone(), + }, + ); conn.flush().unwrap(); } } @@ -102,6 +122,17 @@ impl ScreencopySessionDataExt for SessionData { } } +struct FrameData { + frame_data: ScreencopyFrameData, + session: zcosmic_screencopy_session_v2::ZcosmicScreencopySessionV2, +} + +impl ScreencopyFrameDataExt for FrameData { + fn screencopy_frame_data(&self) -> &ScreencopyFrameData { + &self.frame_data + } +} + impl ScreencopyHandler for AppData { fn screencopy_state(&mut self) -> &mut ScreencopyState { &mut self.screencopy_state @@ -111,8 +142,8 @@ impl ScreencopyHandler for AppData { &mut self, conn: &Connection, _qh: &QueueHandle, - session: &zcosmic_screencopy_session_v1::ZcosmicScreencopySessionV1, - buffer_infos: &[BufferInfo], + session: &zcosmic_screencopy_session_v2::ZcosmicScreencopySessionV2, + formats: &Formats, ) { let Some(capture) = Capture::for_session(session) else { return; @@ -122,22 +153,23 @@ impl ScreencopyHandler for AppData { return; }; - // Create new buffer if none, or different format - if !session.buffers.as_ref().map_or(false, |buffers| { - buffer_infos.contains(&buffers[0].buffer_info) - }) { - session.buffers = Some(array::from_fn(|_| self.create_buffer(buffer_infos))); + // Create new buffer if none + // XXX What if formats have changed? + if session.buffers.is_none() { + session.buffers = Some(array::from_fn(|_| self.create_buffer(formats))); } - session.attach_buffer_and_commit(&capture, conn); + session.attach_buffer_and_commit(&capture, conn, &self.qh); } fn ready( &mut self, conn: &Connection, - _qh: &QueueHandle, - session: &zcosmic_screencopy_session_v1::ZcosmicScreencopySessionV1, + qh: &QueueHandle, + screencopy_frame: &zcosmic_screencopy_frame_v2::ZcosmicScreencopyFrameV2, + frame: Frame, ) { + let session = &screencopy_frame.data::().unwrap().session; let Some(capture) = Capture::for_session(session) else { return; }; @@ -158,6 +190,7 @@ impl ScreencopyHandler for AppData { let capture_clone = capture.clone(); let conn = conn.clone(); let release = session.release.take(); + let qh = qh.clone(); self.scheduler .schedule(async move { if let Some(release) = release { @@ -168,7 +201,7 @@ impl ScreencopyHandler for AppData { let Some(session) = session.as_mut() else { return; }; - session.attach_buffer_and_commit(&capture_clone, &conn); + session.attach_buffer_and_commit(&capture_clone, &conn, &qh); }) .unwrap(); @@ -177,11 +210,10 @@ impl ScreencopyHandler for AppData { session.release = Some(release); // let img = unsafe { front.to_image() }; // let image = CaptureImage { img }; - let buffer_info = &front.buffer_info; let image = CaptureImage { wl_buffer: buffer, - width: buffer_info.width, - height: buffer_info.height, + width: front.size.0, + height: front.size.1, }; match &capture.source { CaptureSource::Toplevel(toplevel) => { @@ -201,15 +233,28 @@ impl ScreencopyHandler for AppData { &mut self, _conn: &Connection, _qh: &QueueHandle, - session: &zcosmic_screencopy_session_v1::ZcosmicScreencopySessionV1, - _reason: WEnum, + screencopy_frame: &zcosmic_screencopy_frame_v2::ZcosmicScreencopyFrameV2, + _reason: WEnum, ) { // TODO log::error!("Screencopy failed"); + let session = &screencopy_frame.data::().unwrap().session; + if let Some(capture) = Capture::for_session(session) { + capture.stop(); + } + } + + fn stopped( + &mut self, + _conn: &Connection, + _qh: &QueueHandle, + session: &zcosmic_screencopy_session_v2::ZcosmicScreencopySessionV2, + ) { + // TODO if let Some(capture) = Capture::for_session(session) { capture.stop(); } } } -cctk::delegate_screencopy!(AppData, session: [SessionData]); +cctk::delegate_screencopy!(AppData, session: [SessionData], frame: [FrameData]);