diff --git a/Cargo.lock b/Cargo.lock index e36ea02788..ffc7366eb9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -33,19 +33,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "getrandom 0.3.3", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.3" @@ -652,9 +639,9 @@ checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "cfg_aliases" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" [[package]] name = "chrono" @@ -843,7 +830,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -1262,7 +1249,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -1290,9 +1277,9 @@ dependencies = [ [[package]] name = "dlib" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a" dependencies = [ "libloading 0.8.8", ] @@ -1393,6 +1380,11 @@ name = "dpi" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" + +[[package]] +name = "dpi" +version = "0.1.2" +source = "git+https://github.com/timon-schelling/winit?branch=graphite#739828c05de222d0851899e4441343eb14aaf922" dependencies = [ "serde", ] @@ -1541,7 +1533,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -1593,7 +1585,7 @@ checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" dependencies = [ "cfg-if", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -3239,9 +3231,9 @@ checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" [[package]] name = "libc" -version = "0.2.175" +version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" [[package]] name = "libloading" @@ -3271,13 +3263,14 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libredox" -version = "0.1.9" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" +checksum = "8d8f1ea3f21fd3405dcaf6c9b5c1630af9afc422d9073ea39c5f6d6c772e08ed" dependencies = [ "bitflags 2.11.0", "libc", - "redox_syscall", + "plain", + "redox_syscall 0.9.3", ] [[package]] @@ -3310,9 +3303,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.9.4" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" @@ -3510,7 +3503,7 @@ version = "0.17.1" source = "git+https://github.com/timon-schelling/muda.git?rev=e5bc28bbd6781b18afbfc237981f9ef47eddf863#e5bc28bbd6781b18afbfc237981f9ef47eddf863" dependencies = [ "crossbeam-channel", - "dpi", + "dpi 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "keyboard-types", "objc2 0.6.3", "objc2-app-kit 0.3.2", @@ -4049,9 +4042,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orbclient" -version = "0.3.48" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba0b26cec2e24f08ed8bb31519a9333140a6599b867dac464bb150bdb796fd43" +checksum = "bb08138df30517916447489a70848de31244c40c7b520bcf5ebdc9db6299da59" dependencies = [ "libredox", ] @@ -4081,7 +4074,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" dependencies = [ "libc", - "windows-sys 0.45.0", + "windows-sys 0.52.0", ] [[package]] @@ -4111,7 +4104,7 @@ checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.17", "smallvec", "windows-targets 0.52.6", ] @@ -4306,6 +4299,12 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + [[package]] name = "plist" version = "1.8.0" @@ -4540,18 +4539,18 @@ checksum = "4339fc7a1021c9c1621d87f5e3505f2805c8c105420ba2f2a4df86814590c142" [[package]] name = "quick-xml" -version = "0.37.5" +version = "0.38.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" +checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" dependencies = [ "memchr", ] [[package]] name = "quick-xml" -version = "0.38.3" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" dependencies = [ "memchr", ] @@ -4609,7 +4608,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -4813,6 +4812,16 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" +[[package]] +name = "redox_event" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5018d583d6d2f5499352aea8d177e9067d1eb03ab17c78169d5ba7a30001b15" +dependencies = [ + "bitflags 2.11.0", + "libredox", +] + [[package]] name = "redox_syscall" version = "0.5.17" @@ -4822,6 +4831,15 @@ dependencies = [ "bitflags 2.11.0", ] +[[package]] +name = "redox_syscall" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d678d17679829e73d371e96880897e98fee2ded7acc0a50bdf8af2affa4b2fe5" +dependencies = [ + "bitflags 2.11.0", +] + [[package]] name = "redox_users" version = "0.5.2" @@ -5118,15 +5136,15 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.8" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ "bitflags 2.11.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -5194,7 +5212,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -5292,14 +5310,14 @@ dependencies = [ [[package]] name = "sctk-adwaita" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd3accc0f3f4bbaf2c9e1957a030dc582028130c67660d44c0a0345a22ca69b" +checksum = "1f8ea028b7cb32e2f577b0a55a7b54cb206376bdb1221bd5c81dcf20b68db1fb" dependencies = [ "ab_glyph", "log", "memmap2 0.9.10", - "smithay-client-toolkit", + "smithay-client-toolkit 0.21.1", "tiny-skia", ] @@ -5632,7 +5650,32 @@ dependencies = [ "wayland-csd-frame", "wayland-cursor", "wayland-protocols", - "wayland-protocols-experimental", + "wayland-protocols-experimental 20250721.0.1", + "wayland-protocols-misc", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dc9ee14b0fdcb535f9556141bacac070c994a977d2240ee455d7438a617f00" +dependencies = [ + "bitflags 2.11.0", + "calloop", + "calloop-wayland-source", + "cursor-icon", + "log", + "memmap2 0.9.10", + "rustix", + "thiserror 2.0.18", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-experimental 20251230.0.3", "wayland-protocols-misc", "wayland-protocols-wlr", "wayland-scanner", @@ -5646,7 +5689,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71704c03f739f7745053bde45fa203a46c58d25bc5c4efba1d9a60e9dba81226" dependencies = [ "libc", - "smithay-client-toolkit", + "smithay-client-toolkit 0.20.0", "wayland-backend", ] @@ -5937,7 +5980,7 @@ dependencies = [ "getrandom 0.3.3", "once_cell", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -6079,27 +6122,16 @@ dependencies = [ [[package]] name = "tiny-skia" -version = "0.11.4" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +checksum = "47ffee5eaaf5527f630fb0e356b90ebdec84d5d18d937c5e440350f88c5a91ea" dependencies = [ "arrayref", "arrayvec", "bytemuck", "cfg-if", "log", - "tiny-skia-path 0.11.4", -] - -[[package]] -name = "tiny-skia-path" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" -dependencies = [ - "arrayref", - "bytemuck", - "strict-num", + "tiny-skia-path", ] [[package]] @@ -6575,7 +6607,7 @@ dependencies = [ "siphasher", "strict-num", "svgtypes", - "tiny-skia-path 0.12.0", + "tiny-skia-path", "ttf-parser", "unicode-bidi", "unicode-script", @@ -6813,9 +6845,9 @@ dependencies = [ [[package]] name = "wayland-backend" -version = "0.3.11" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673a33c33048a5ade91a6b139580fa174e19fb0d23f396dca9fa15f2e1e49b35" +checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078" dependencies = [ "cc", "downcast-rs", @@ -6827,9 +6859,9 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.11" +version = "0.31.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66a47e840dc20793f2264eb4b3e4ecb4b75d91c0dd4af04b456128e0bdd449d" +checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073" dependencies = [ "bitflags 2.11.0", "rustix", @@ -6850,9 +6882,9 @@ dependencies = [ [[package]] name = "wayland-cursor" -version = "0.31.11" +version = "0.31.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447ccc440a881271b19e9989f75726d60faa09b95b0200a9b7eb5cc47c3eeb29" +checksum = "4a52d18780be9b1314328a3de5f930b73d2200112e3849ca6cb11822793fb34d" dependencies = [ "rustix", "wayland-client", @@ -6861,9 +6893,9 @@ dependencies = [ [[package]] name = "wayland-protocols" -version = "0.32.9" +version = "0.32.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa790ed75fbfd71283bd2521a1cfdc022aabcc28bdcff00851f9e4ae88d9901" +checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6" dependencies = [ "bitflags 2.11.0", "wayland-backend", @@ -6884,6 +6916,19 @@ dependencies = [ "wayland-scanner", ] +[[package]] +name = "wayland-protocols-experimental" +version = "20251230.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91c6c3e7178e553d093d46999032bc79aafea9dedd71dd702c8ace7bbc25cf13" +dependencies = [ + "bitflags 2.11.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + [[package]] name = "wayland-protocols-misc" version = "0.3.9" @@ -6925,20 +6970,20 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.31.7" +version = "0.31.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54cb1e9dc49da91950bdfd8b848c49330536d9d1fb03d4bfec8cae50caa50ae3" +checksum = "338e30461b3a2b67d70eb30a6d89f8e0c93a833e07d2ae89085cd070c4a00ac0" dependencies = [ "proc-macro2", - "quick-xml 0.37.5", + "quick-xml 0.41.0", "quote", ] [[package]] name = "wayland-sys" -version = "0.31.7" +version = "0.31.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34949b42822155826b41db8e5d0c1be3a2bd296c747577a43a3e6daefc296142" +checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be" dependencies = [ "dlib", "log", @@ -7225,7 +7270,7 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0978bf7171b3d90bac376700cb56d606feb40f251a475a5d6634613564460b22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -7691,14 +7736,13 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winit" -version = "0.31.0-beta.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2879d2854d1a43e48f67322d4bd097afcb6eb8f8f775c8de0260a71aea1df1aa" +version = "0.31.0-beta.3" +source = "git+https://github.com/timon-schelling/winit?branch=graphite#739828c05de222d0851899e4441343eb14aaf922" dependencies = [ "bitflags 2.11.0", "cfg_aliases", "cursor-icon", - "dpi", + "dpi 0.1.2 (git+https://github.com/timon-schelling/winit?branch=graphite)", "libc", "raw-window-handle", "rustix", @@ -7719,13 +7763,12 @@ dependencies = [ [[package]] name = "winit-android" -version = "0.31.0-beta.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d9c0d2cd93efec3a9f9ad819cfaf0834782403af7c0d248c784ec0c61761df" +version = "0.31.0-beta.3" +source = "git+https://github.com/timon-schelling/winit?branch=graphite#739828c05de222d0851899e4441343eb14aaf922" dependencies = [ "android-activity", "bitflags 2.11.0", - "dpi", + "dpi 0.1.2 (git+https://github.com/timon-schelling/winit?branch=graphite)", "ndk", "raw-window-handle", "smol_str", @@ -7735,14 +7778,13 @@ dependencies = [ [[package]] name = "winit-appkit" -version = "0.31.0-beta.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21310ca07851a49c348e0c2cc768e36b52ca65afda2c2354d78ed4b90074d8aa" +version = "0.31.0-beta.3" +source = "git+https://github.com/timon-schelling/winit?branch=graphite#739828c05de222d0851899e4441343eb14aaf922" dependencies = [ "bitflags 2.11.0", "block2 0.6.2", "dispatch2", - "dpi", + "dpi 0.1.2 (git+https://github.com/timon-schelling/winit?branch=graphite)", "objc2 0.6.3", "objc2-app-kit 0.3.2", "objc2-core-foundation", @@ -7758,13 +7800,15 @@ dependencies = [ [[package]] name = "winit-common" -version = "0.31.0-beta.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45375fbac4cbb77260d83a30b1f9d8105880dbac99a9ae97f56656694680ff69" +version = "0.31.0-beta.3" +source = "git+https://github.com/timon-schelling/winit?branch=graphite#739828c05de222d0851899e4441343eb14aaf922" dependencies = [ + "block2 0.6.2", + "dpi 0.1.2 (git+https://github.com/timon-schelling/winit?branch=graphite)", "memmap2 0.9.10", "objc2 0.6.3", "objc2-core-foundation", + "objc2-foundation 0.3.2", "smol_str", "tracing", "winit-core", @@ -7774,31 +7818,31 @@ dependencies = [ [[package]] name = "winit-core" -version = "0.31.0-beta.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4f0ccd7abb43740e2c6124ac7cae7d865ecec74eec63783e8922577ac232583" +version = "0.31.0-beta.3" +source = "git+https://github.com/timon-schelling/winit?branch=graphite#739828c05de222d0851899e4441343eb14aaf922" dependencies = [ "bitflags 2.11.0", "cursor-icon", - "dpi", + "dpi 0.1.2 (git+https://github.com/timon-schelling/winit?branch=graphite)", "keyboard-types", "raw-window-handle", "serde", "smol_str", + "url", "web-time", ] [[package]] name = "winit-orbital" -version = "0.31.0-beta.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ea1fb262e7209f265f12bd0cc792c399b14355675e65531e9c8a87db287d46" +version = "0.31.0-beta.3" +source = "git+https://github.com/timon-schelling/winit?branch=graphite#739828c05de222d0851899e4441343eb14aaf922" dependencies = [ "bitflags 2.11.0", - "dpi", + "dpi 0.1.2 (git+https://github.com/timon-schelling/winit?branch=graphite)", + "libredox", "orbclient", "raw-window-handle", - "redox_syscall", + "redox_event", "smol_str", "tracing", "winit-core", @@ -7806,14 +7850,13 @@ dependencies = [ [[package]] name = "winit-uikit" -version = "0.31.0-beta.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "680a356e798837d8eb274d4556e83bceaf81698194e31aafc5cfb8a9f2fab643" +version = "0.31.0-beta.3" +source = "git+https://github.com/timon-schelling/winit?branch=graphite#739828c05de222d0851899e4441343eb14aaf922" dependencies = [ "bitflags 2.11.0", "block2 0.6.2", "dispatch2", - "dpi", + "dpi 0.1.2 (git+https://github.com/timon-schelling/winit?branch=graphite)", "objc2 0.6.3", "objc2-core-foundation", "objc2-foundation 0.3.2", @@ -7828,21 +7871,21 @@ dependencies = [ [[package]] name = "winit-wayland" -version = "0.31.0-beta.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce5afb2ba07da603f84b722c95f9f9396d2cedae3944fb6c0cda4a6f88de545" +version = "0.31.0-beta.3" +source = "git+https://github.com/timon-schelling/winit?branch=graphite#739828c05de222d0851899e4441343eb14aaf922" dependencies = [ - "ahash", "bitflags 2.11.0", "calloop", "cursor-icon", - "dpi", + "dpi 0.1.2 (git+https://github.com/timon-schelling/winit?branch=graphite)", + "foldhash 0.2.0", "libc", "memmap2 0.9.10", + "percent-encoding", "raw-window-handle", "rustix", "sctk-adwaita", - "smithay-client-toolkit", + "smithay-client-toolkit 0.21.1", "smol_str", "tracing", "wayland-backend", @@ -7855,15 +7898,14 @@ dependencies = [ [[package]] name = "winit-web" -version = "0.31.0-beta.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c2490a953fb776fbbd5e295d54f1c3847f4f15b6c3929ec53c09acda6487a92" +version = "0.31.0-beta.3" +source = "git+https://github.com/timon-schelling/winit?branch=graphite#739828c05de222d0851899e4441343eb14aaf922" dependencies = [ "atomic-waker", "bitflags 2.11.0", "concurrent-queue", "cursor-icon", - "dpi", + "dpi 0.1.2 (git+https://github.com/timon-schelling/winit?branch=graphite)", "js-sys", "pin-project", "raw-window-handle", @@ -7878,32 +7920,32 @@ dependencies = [ [[package]] name = "winit-win32" -version = "0.31.0-beta.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "644ea78af0e858aa3b092e5d1c67c41995a98220c81813f1353b28bc8bb91eaa" +version = "0.31.0-beta.3" +source = "git+https://github.com/timon-schelling/winit?branch=graphite#739828c05de222d0851899e4441343eb14aaf922" dependencies = [ "bitflags 2.11.0", "cursor-icon", - "dpi", + "dpi 0.1.2 (git+https://github.com/timon-schelling/winit?branch=graphite)", "raw-window-handle", "smol_str", "tracing", "unicode-segmentation", - "windows-sys 0.59.0", + "url", + "windows-sys 0.61.2", + "winit-common", "winit-core", ] [[package]] name = "winit-x11" -version = "0.31.0-beta.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa5b600756534c7041aa93cd0d244d44b09fca1b89e202bd1cd80dd9f3636c46" +version = "0.31.0-beta.3" +source = "git+https://github.com/timon-schelling/winit?branch=graphite#739828c05de222d0851899e4441343eb14aaf922" dependencies = [ "bitflags 2.11.0", "bytemuck", "calloop", "cursor-icon", - "dpi", + "dpi 0.1.2 (git+https://github.com/timon-schelling/winit?branch=graphite)", "libc", "percent-encoding", "raw-window-handle", diff --git a/Cargo.toml b/Cargo.toml index 194897cbdb..f7d242e817 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -260,6 +260,7 @@ lto = "thin" debug = true [patch.crates-io] +winit = { git = "https://github.com/timon-schelling/winit", branch = "graphite" } rfd = { git = "https://github.com/timon-schelling/rfd.git", branch = "graphite" } # TODO: Remove this once https://github.com/PolyMeilex/rfd/pull/317 is merged and released cef = { git = "https://github.com/timon-schelling/cef-rs.git", branch = "graphite-151" } cef-dll-sys = { git = "https://github.com/timon-schelling/cef-rs.git", branch = "graphite-151" } diff --git a/desktop/src/app.rs b/desktop/src/app.rs index b89d1a5a96..3988bc41dc 100644 --- a/desktop/src/app.rs +++ b/desktop/src/app.rs @@ -9,10 +9,11 @@ use std::sync::mpsc::{Receiver, SyncSender}; use std::thread; use std::time::{Duration, Instant}; use winit::application::ApplicationHandler; +use winit::data_transfer::TypeHint; use winit::dpi::PhysicalSize; use winit::event::{ElementState, MouseButton, StartCause, WindowEvent}; use winit::event_loop::run_on_demand::EventLoopExtRunOnDemand; -use winit::event_loop::{ActiveEventLoop, ControlFlow, EventLoop}; +use winit::event_loop::{ActiveEventLoop, AsyncRequestSerial, ControlFlow, DndAction, EventLoop}; use winit::window::WindowId; use crate::dirs; @@ -35,6 +36,7 @@ pub(crate) struct App { window_maximized: bool, window_fullscreen: bool, window_pending_drag: bool, + pending_dnd_fetch: Option, input_state: InputState, ui_scale: f64, app_event_receiver: Receiver, @@ -107,6 +109,7 @@ impl App { window_maximized: false, window_fullscreen: false, window_pending_drag: false, + pending_dnd_fetch: None, input_state: InputState::new(), ui_scale: 1., app_event_receiver, @@ -538,7 +541,7 @@ impl ApplicationHandler for App { } } - fn window_event(&mut self, _event_loop: &dyn ActiveEventLoop, _window_id: WindowId, event: WindowEvent) { + fn window_event(&mut self, event_loop: &dyn ActiveEventLoop, _window_id: WindowId, event: WindowEvent) { // Handle pointer lock release if let WindowEvent::PointerButton { state: ElementState::Released, @@ -601,20 +604,39 @@ impl ApplicationHandler for App { self.exit(Some(ExitReason::UiAccelerationFailure)); } } - WindowEvent::DragDropped { paths, .. } => { - for path in paths { - match fs::read(&path) { - Ok(content) => { - let message = DesktopWrapperMessage::ImportFile { path, content }; - self.app_event_scheduler.schedule(AppEvent::DesktopWrapperMessage(message)); - } - Err(e) => { - tracing::error!("Failed to read dropped file {}: {}", path.display(), e); - return; - } - }; + WindowEvent::DragEntered { id, .. } => { + let accepts = event_loop.data_transfer(id).is_ok_and(|data_transfer| data_transfer.has_type(&TypeHint::UriList)); + let actions: &[DndAction] = if accepts { &[DndAction::Copy] } else { &[] }; + if let Err(e) = event_loop.set_valid_dnd_actions(id, actions) { + tracing::error!("Failed to set valid drag and drop actions: {e}"); } } + WindowEvent::DragDropped { id, .. } => match event_loop.fetch_data_transfer(id, &TypeHint::UriList) { + Ok(serial) => self.pending_dnd_fetch = Some(serial), + Err(e) => tracing::error!("Failed to fetch dropped data: {e}"), + }, + WindowEvent::DataTransferReceived { serial, ref value, .. } if self.pending_dnd_fetch == Some(serial) => match value.try_as_file_paths() { + Ok(paths) => { + self.pending_dnd_fetch = None; + for path in paths { + match fs::read(&path) { + Ok(content) => { + let message = DesktopWrapperMessage::ImportFile { path, content }; + self.app_event_scheduler.schedule(AppEvent::DesktopWrapperMessage(message)); + } + Err(e) => { + tracing::error!("Failed to read dropped file {}: {}", path.display(), e); + return; + } + }; + } + } + Err(e) if e.kind() == std::io::ErrorKind::WouldBlock => {} + Err(e) => { + self.pending_dnd_fetch = None; + tracing::error!("Failed to read dropped data: {e}"); + } + }, WindowEvent::PointerMoved { .. } | WindowEvent::PointerLeft { position: Some(_), .. } | WindowEvent::PointerEntered { .. } if !self.input_state.pointer_locked() && self.window_pending_drag => diff --git a/desktop/src/input.rs b/desktop/src/input.rs index 731f43fdba..dcc438f35b 100644 --- a/desktop/src/input.rs +++ b/desktop/src/input.rs @@ -221,6 +221,7 @@ impl InputState { let input = match delta { MouseScrollDelta::LineDelta(x, y) => InputEvent::pointer().scrolled_lines(f64::from(*x), f64::from(*y)), MouseScrollDelta::PixelDelta(position) => InputEvent::pointer().scrolled_pixels(position.x, position.y), + _ => return, }; ui_callback(input.modifiers(self.modifiers).build()); return; @@ -229,6 +230,7 @@ impl InputState { let (x, y) = match delta { MouseScrollDelta::LineDelta(x, y) => (f64::from(*x) * SCROLL_LINE_WIDTH, f64::from(*y) * SCROLL_LINE_HEIGHT), MouseScrollDelta::PixelDelta(position) => (position.x, position.y), + _ => return, }; let scroll_delta = ScrollDelta::new(-x * SCROLL_SPEED_X, -y * SCROLL_SPEED_Y, 0.);