Update to to winit 0.28 (#2654)

* Update to winit 0.28

Mac trackpads pinch gestures will now generate `egui::Event::Zoom`

* Update accesskit_winit

* Try to get Android CI green

* Fix wayland compilation

* Add comment about android-activity

* Update changelogs

* Fix call to register_xlib_error_hook
This commit is contained in:
Emil Ernerfeldt 2023-02-04 12:43:43 +01:00 committed by GitHub
parent e4eaf99072
commit 8344e88f8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 202 additions and 252 deletions

377
Cargo.lock generated
View file

@ -70,9 +70,9 @@ dependencies = [
[[package]] [[package]]
name = "accesskit_windows" name = "accesskit_windows"
version = "0.10.4" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "662496f45a2e2ddff05e28d0a9fc2b319cc4f886d3664e3469c3d30800598962" checksum = "620160ad7d0aec2b4ae487bc8fbf0367982651d27bf8908a49d03548cfce73ec"
dependencies = [ dependencies = [
"accesskit", "accesskit",
"accesskit_consumer", "accesskit_consumer",
@ -85,9 +85,9 @@ dependencies = [
[[package]] [[package]]
name = "accesskit_winit" name = "accesskit_winit"
version = "0.8.1" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98f6f5259594c7d3a0ce5d63a354839c8db5120bda7350a249ed51830e0250c1" checksum = "ad401ccee3adde31edbbf7e8c7dd3fcb3fb916f7e519c135608b6b5231d633d4"
dependencies = [ dependencies = [
"accesskit", "accesskit",
"accesskit_macos", "accesskit_macos",
@ -144,6 +144,30 @@ dependencies = [
"memchr", "memchr",
] ]
[[package]]
name = "android-activity"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4165a1aef703232031b40a6e8908c2f9e314d495f11aa7f98db75d39a497cc6a"
dependencies = [
"android-properties",
"bitflags",
"cc",
"jni-sys",
"libc",
"log",
"ndk",
"ndk-context",
"ndk-sys",
"num_enum",
]
[[package]]
name = "android-properties"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04"
[[package]] [[package]]
name = "android_system_properties" name = "android_system_properties"
version = "0.1.5" version = "0.1.5"
@ -715,15 +739,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "cmake"
version = "0.1.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c"
dependencies = [
"cc",
]
[[package]] [[package]]
name = "cocoa" name = "cocoa"
version = "0.24.1" version = "0.24.1"
@ -735,7 +750,7 @@ dependencies = [
"cocoa-foundation", "cocoa-foundation",
"core-foundation", "core-foundation",
"core-graphics", "core-graphics",
"foreign-types 0.3.2", "foreign-types",
"libc", "libc",
"objc", "objc",
] ]
@ -750,7 +765,7 @@ dependencies = [
"block", "block",
"core-foundation", "core-foundation",
"core-graphics-types", "core-graphics-types",
"foreign-types 0.3.2", "foreign-types",
"libc", "libc",
"objc", "objc",
] ]
@ -844,7 +859,7 @@ dependencies = [
"bitflags", "bitflags",
"core-foundation", "core-foundation",
"core-graphics-types", "core-graphics-types",
"foreign-types 0.3.2", "foreign-types",
"libc", "libc",
] ]
@ -856,19 +871,7 @@ checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"core-foundation", "core-foundation",
"foreign-types 0.3.2", "foreign-types",
"libc",
]
[[package]]
name = "core-text"
version = "19.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25"
dependencies = [
"core-foundation",
"core-graphics",
"foreign-types 0.3.2",
"libc", "libc",
] ]
@ -943,29 +946,6 @@ dependencies = [
"cfg-if", "cfg-if",
] ]
[[package]]
name = "crossfont"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21fd3add36ea31aba1520aa5288714dd63be506106753226d0eb387a93bc9c45"
dependencies = [
"cocoa",
"core-foundation",
"core-foundation-sys",
"core-graphics",
"core-text",
"dwrote",
"foreign-types 0.5.0",
"freetype-rs",
"libc",
"log",
"objc",
"once_cell",
"pkg-config",
"servo-fontconfig",
"winapi",
]
[[package]] [[package]]
name = "crypto-common" name = "crypto-common"
version = "0.1.6" version = "0.1.6"
@ -1296,20 +1276,6 @@ dependencies = [
"poll-promise", "poll-promise",
] ]
[[package]]
name = "dwrote"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b"
dependencies = [
"lazy_static",
"libc",
"serde",
"serde_derive",
"winapi",
"wio",
]
[[package]] [[package]]
name = "dyn-clonable" name = "dyn-clonable"
version = "0.9.0" version = "0.9.0"
@ -1367,7 +1333,7 @@ dependencies = [
"percent-encoding", "percent-encoding",
"pollster", "pollster",
"puffin", "puffin",
"raw-window-handle 0.5.0", "raw-window-handle",
"ron", "ron",
"serde", "serde",
"thiserror", "thiserror",
@ -1413,6 +1379,7 @@ name = "egui-winit"
version = "0.20.1" version = "0.20.1"
dependencies = [ dependencies = [
"accesskit_winit", "accesskit_winit",
"android-activity",
"arboard", "arboard",
"document-features", "document-features",
"egui", "egui",
@ -1489,7 +1456,7 @@ dependencies = [
"glutin", "glutin",
"memoffset", "memoffset",
"puffin", "puffin",
"raw-window-handle 0.5.0", "raw-window-handle",
"tracing", "tracing",
"wasm-bindgen", "wasm-bindgen",
"web-sys", "web-sys",
@ -1622,16 +1589,6 @@ version = "2.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
[[package]]
name = "expat-sys"
version = "2.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa"
dependencies = [
"cmake",
"pkg-config",
]
[[package]] [[package]]
name = "fancy-regex" name = "fancy-regex"
version = "0.7.1" version = "0.7.1"
@ -1708,28 +1665,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
dependencies = [ dependencies = [
"foreign-types-shared 0.1.1", "foreign-types-shared",
]
[[package]]
name = "foreign-types"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965"
dependencies = [
"foreign-types-macros",
"foreign-types-shared 0.3.1",
]
[[package]]
name = "foreign-types-macros"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8469d0d40519bc608ec6863f1cc88f3f1deee15913f2f3b3e573d81ed38cccc"
dependencies = [
"proc-macro2",
"quote",
"syn",
] ]
[[package]] [[package]]
@ -1738,12 +1674,6 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]]
name = "foreign-types-shared"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
[[package]] [[package]]
name = "form_urlencoded" name = "form_urlencoded"
version = "1.1.0" version = "1.1.0"
@ -1753,28 +1683,6 @@ dependencies = [
"percent-encoding", "percent-encoding",
] ]
[[package]]
name = "freetype-rs"
version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74eadec9d0a5c28c54bb9882e54787275152a4e36ce206b45d7451384e5bf5fb"
dependencies = [
"bitflags",
"freetype-sys",
"libc",
]
[[package]]
name = "freetype-sys"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a"
dependencies = [
"cmake",
"libc",
"pkg-config",
]
[[package]] [[package]]
name = "futures-core" name = "futures-core"
version = "0.3.25" version = "0.3.25"
@ -1995,7 +1903,7 @@ dependencies = [
"libloading", "libloading",
"objc", "objc",
"once_cell", "once_cell",
"raw-window-handle 0.5.0", "raw-window-handle",
"wayland-sys 0.30.0", "wayland-sys 0.30.0",
"windows-sys 0.36.1", "windows-sys 0.36.1",
"x11-dl", "x11-dl",
@ -2489,7 +2397,7 @@ dependencies = [
"bitflags", "bitflags",
"block", "block",
"core-graphics-types", "core-graphics-types",
"foreign-types 0.3.2", "foreign-types",
"log", "log",
"objc", "objc",
] ]
@ -2557,7 +2465,7 @@ dependencies = [
"jni-sys", "jni-sys",
"ndk-sys", "ndk-sys",
"num_enum", "num_enum",
"raw-window-handle 0.5.0", "raw-window-handle",
"thiserror", "thiserror",
] ]
@ -2795,6 +2703,18 @@ version = "11.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
[[package]]
name = "orbclient"
version = "0.3.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba683f1641c11041c59d5d93689187abcab3c1349dc6d9d70c550c9f9360802f"
dependencies = [
"cfg-if",
"redox_syscall 0.2.16",
"wasm-bindgen",
"web-sys",
]
[[package]] [[package]]
name = "ordered-multimap" name = "ordered-multimap"
version = "0.4.3" version = "0.4.3"
@ -2878,7 +2798,7 @@ checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"libc", "libc",
"redox_syscall", "redox_syscall 0.2.16",
"smallvec", "smallvec",
"windows-sys 0.42.0", "windows-sys 0.42.0",
] ]
@ -3094,15 +3014,6 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63e935c45e09cc6dcf00d2f0b2d630a58f4095320223d47fc68918722f0538b6" checksum = "63e935c45e09cc6dcf00d2f0b2d630a58f4095320223d47fc68918722f0538b6"
[[package]]
name = "raw-window-handle"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b800beb9b6e7d2df1fe337c9e3d04e3af22a124460fb4c30fcc22c9117cefb41"
dependencies = [
"cty",
]
[[package]] [[package]]
name = "raw-window-handle" name = "raw-window-handle"
version = "0.5.0" version = "0.5.0"
@ -3127,6 +3038,15 @@ dependencies = [
"bitflags", "bitflags",
] ]
[[package]]
name = "redox_syscall"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb02a9aee8e8c7ad8d86890f1e16b49e0bbbffc9961ff3788c31d57c98bcbf03"
dependencies = [
"bitflags",
]
[[package]] [[package]]
name = "redox_users" name = "redox_users"
version = "0.4.3" version = "0.4.3"
@ -3134,7 +3054,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
dependencies = [ dependencies = [
"getrandom", "getrandom",
"redox_syscall", "redox_syscall 0.2.16",
"thiserror", "thiserror",
] ]
@ -3214,7 +3134,7 @@ dependencies = [
"objc", "objc",
"objc-foundation", "objc-foundation",
"objc_id", "objc_id",
"raw-window-handle 0.5.0", "raw-window-handle",
"wasm-bindgen", "wasm-bindgen",
"wasm-bindgen-futures", "wasm-bindgen-futures",
"web-sys", "web-sys",
@ -3394,14 +3314,15 @@ dependencies = [
[[package]] [[package]]
name = "sctk-adwaita" name = "sctk-adwaita"
version = "0.4.3" version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" checksum = "cc56402866c717f54e48b122eb93c69f709bc5a6359c403598992fd92f017931"
dependencies = [ dependencies = [
"crossfont", "ab_glyph",
"log", "log",
"memmap2",
"smithay-client-toolkit", "smithay-client-toolkit",
"tiny-skia 0.7.0", "tiny-skia 0.8.2",
] ]
[[package]] [[package]]
@ -3465,27 +3386,6 @@ dependencies = [
"eframe", "eframe",
] ]
[[package]]
name = "servo-fontconfig"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c"
dependencies = [
"libc",
"servo-fontconfig-sys",
]
[[package]]
name = "servo-fontconfig-sys"
version = "5.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388"
dependencies = [
"expat-sys",
"freetype-sys",
"pkg-config",
]
[[package]] [[package]]
name = "sha1" name = "sha1"
version = "0.10.5" version = "0.10.5"
@ -3638,6 +3538,12 @@ version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0"
[[package]]
name = "strict-num"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9df65f20698aeed245efdde3628a6b559ea1239bbb871af1b6e3b58c413b2bd1"
[[package]] [[package]]
name = "strsim" name = "strsim"
version = "0.10.0" version = "0.10.0"
@ -3727,7 +3633,7 @@ dependencies = [
"cfg-if", "cfg-if",
"fastrand", "fastrand",
"libc", "libc",
"redox_syscall", "redox_syscall 0.2.16",
"remove_dir_all", "remove_dir_all",
"winapi", "winapi",
] ]
@ -3857,27 +3763,27 @@ dependencies = [
[[package]] [[package]]
name = "tiny-skia" name = "tiny-skia"
version = "0.7.0" version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" checksum = "0ae12c22601b6853f4d93abb178e13bf0e1cc8e2454100c85d4d3a59ac71b3f7"
dependencies = [ dependencies = [
"arrayref", "arrayref",
"arrayvec 0.5.2", "arrayvec 0.7.2",
"bytemuck", "bytemuck",
"cfg-if", "cfg-if",
"png", "png",
"safe_arch",
"tiny-skia-path", "tiny-skia-path",
] ]
[[package]] [[package]]
name = "tiny-skia-path" name = "tiny-skia-path"
version = "0.7.0" version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c114d32f0c2ee43d585367cb013dfaba967ab9f62b90d9af0d696e955e70fa6c" checksum = "bd665853ce64402daabef6edda442dbb4f8ee93ea80957b66ba1af419f11a104"
dependencies = [ dependencies = [
"arrayref", "arrayref",
"bytemuck", "bytemuck",
"strict-num",
] ]
[[package]] [[package]]
@ -4410,7 +4316,7 @@ dependencies = [
"log", "log",
"ndk-context", "ndk-context",
"objc", "objc",
"raw-window-handle 0.5.0", "raw-window-handle",
"url", "url",
"web-sys", "web-sys",
] ]
@ -4462,7 +4368,7 @@ dependencies = [
"naga", "naga",
"parking_lot", "parking_lot",
"profiling", "profiling",
"raw-window-handle 0.5.0", "raw-window-handle",
"smallvec", "smallvec",
"static_assertions", "static_assertions",
"wasm-bindgen", "wasm-bindgen",
@ -4488,7 +4394,7 @@ dependencies = [
"naga", "naga",
"parking_lot", "parking_lot",
"profiling", "profiling",
"raw-window-handle 0.5.0", "raw-window-handle",
"smallvec", "smallvec",
"thiserror", "thiserror",
"web-sys", "web-sys",
@ -4510,7 +4416,7 @@ dependencies = [
"block", "block",
"core-graphics-types", "core-graphics-types",
"d3d12", "d3d12",
"foreign-types 0.3.2", "foreign-types",
"fxhash", "fxhash",
"glow 0.12.0", "glow 0.12.0",
"gpu-alloc", "gpu-alloc",
@ -4528,7 +4434,7 @@ dependencies = [
"parking_lot", "parking_lot",
"profiling", "profiling",
"range-alloc", "range-alloc",
"raw-window-handle 0.5.0", "raw-window-handle",
"renderdoc-sys", "renderdoc-sys",
"smallvec", "smallvec",
"thiserror", "thiserror",
@ -4627,12 +4533,12 @@ checksum = "0286ba339aa753e70765d521bb0242cc48e1194562bfa2a2ad7ac8a6de28f5d5"
dependencies = [ dependencies = [
"windows-implement", "windows-implement",
"windows_aarch64_gnullvm", "windows_aarch64_gnullvm",
"windows_aarch64_msvc 0.42.0", "windows_aarch64_msvc 0.42.1",
"windows_i686_gnu 0.42.0", "windows_i686_gnu 0.42.1",
"windows_i686_msvc 0.42.0", "windows_i686_msvc 0.42.1",
"windows_x86_64_gnu 0.42.0", "windows_x86_64_gnu 0.42.1",
"windows_x86_64_gnullvm", "windows_x86_64_gnullvm",
"windows_x86_64_msvc 0.42.0", "windows_x86_64_msvc 0.42.1",
] ]
[[package]] [[package]]
@ -4642,12 +4548,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04662ed0e3e5630dfa9b26e4cb823b817f1a9addda855d973a9458c236556244" checksum = "04662ed0e3e5630dfa9b26e4cb823b817f1a9addda855d973a9458c236556244"
dependencies = [ dependencies = [
"windows_aarch64_gnullvm", "windows_aarch64_gnullvm",
"windows_aarch64_msvc 0.42.0", "windows_aarch64_msvc 0.42.1",
"windows_i686_gnu 0.42.0", "windows_i686_gnu 0.42.1",
"windows_i686_msvc 0.42.0", "windows_i686_msvc 0.42.1",
"windows_x86_64_gnu 0.42.0", "windows_x86_64_gnu 0.42.1",
"windows_x86_64_gnullvm", "windows_x86_64_gnullvm",
"windows_x86_64_msvc 0.42.0", "windows_x86_64_msvc 0.42.1",
] ]
[[package]] [[package]]
@ -4681,19 +4587,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
dependencies = [ dependencies = [
"windows_aarch64_gnullvm", "windows_aarch64_gnullvm",
"windows_aarch64_msvc 0.42.0", "windows_aarch64_msvc 0.42.1",
"windows_i686_gnu 0.42.0", "windows_i686_gnu 0.42.1",
"windows_i686_msvc 0.42.0", "windows_i686_msvc 0.42.1",
"windows_x86_64_gnu 0.42.0", "windows_x86_64_gnu 0.42.1",
"windows_x86_64_gnullvm", "windows_x86_64_gnullvm",
"windows_x86_64_msvc 0.42.0", "windows_x86_64_msvc 0.42.1",
]
[[package]]
name = "windows-sys"
version = "0.45.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc 0.42.1",
"windows_i686_gnu 0.42.1",
"windows_i686_msvc 0.42.1",
"windows_x86_64_gnu 0.42.1",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc 0.42.1",
] ]
[[package]] [[package]]
name = "windows_aarch64_gnullvm" name = "windows_aarch64_gnullvm"
version = "0.42.0" version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608"
[[package]] [[package]]
name = "windows_aarch64_msvc" name = "windows_aarch64_msvc"
@ -4709,9 +4639,9 @@ checksum = "2623277cb2d1c216ba3b578c0f3cf9cdebeddb6e66b1b218bb33596ea7769c3a"
[[package]] [[package]]
name = "windows_aarch64_msvc" name = "windows_aarch64_msvc"
version = "0.42.0" version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
[[package]] [[package]]
name = "windows_i686_gnu" name = "windows_i686_gnu"
@ -4727,9 +4657,9 @@ checksum = "d3925fd0b0b804730d44d4b6278c50f9699703ec49bcd628020f46f4ba07d9e1"
[[package]] [[package]]
name = "windows_i686_gnu" name = "windows_i686_gnu"
version = "0.42.0" version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640"
[[package]] [[package]]
name = "windows_i686_msvc" name = "windows_i686_msvc"
@ -4745,9 +4675,9 @@ checksum = "ce907ac74fe331b524c1298683efbf598bb031bc84d5e274db2083696d07c57c"
[[package]] [[package]]
name = "windows_i686_msvc" name = "windows_i686_msvc"
version = "0.42.0" version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
[[package]] [[package]]
name = "windows_x86_64_gnu" name = "windows_x86_64_gnu"
@ -4763,15 +4693,15 @@ checksum = "2babfba0828f2e6b32457d5341427dcbb577ceef556273229959ac23a10af33d"
[[package]] [[package]]
name = "windows_x86_64_gnu" name = "windows_x86_64_gnu"
version = "0.42.0" version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45"
[[package]] [[package]]
name = "windows_x86_64_gnullvm" name = "windows_x86_64_gnullvm"
version = "0.42.0" version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463"
[[package]] [[package]]
name = "windows_x86_64_msvc" name = "windows_x86_64_msvc"
@ -4787,18 +4717,19 @@ checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d"
[[package]] [[package]]
name = "windows_x86_64_msvc" name = "windows_x86_64_msvc"
version = "0.42.0" version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
[[package]] [[package]]
name = "winit" name = "winit"
version = "0.27.5" version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb796d6fbd86b2fd896c9471e6f04d39d750076ebe5680a3958f00f5ab97657c" checksum = "0c4755d4ba0e3d30fc7beef2095e246b1e6a6fad0717608bcb87a2df4b003bcf"
dependencies = [ dependencies = [
"android-activity",
"bitflags", "bitflags",
"cocoa", "cfg_aliases",
"core-foundation", "core-foundation",
"core-graphics", "core-graphics",
"dispatch", "dispatch",
@ -4807,20 +4738,21 @@ dependencies = [
"log", "log",
"mio", "mio",
"ndk", "ndk",
"ndk-glue", "objc2",
"objc",
"once_cell", "once_cell",
"parking_lot", "orbclient",
"percent-encoding", "percent-encoding",
"raw-window-handle 0.4.3", "raw-window-handle",
"raw-window-handle 0.5.0", "redox_syscall 0.3.4",
"sctk-adwaita", "sctk-adwaita",
"smithay-client-toolkit", "smithay-client-toolkit",
"wasm-bindgen", "wasm-bindgen",
"wayland-client", "wayland-client",
"wayland-commons",
"wayland-protocols", "wayland-protocols",
"wayland-scanner",
"web-sys", "web-sys",
"windows-sys 0.36.1", "windows-sys 0.45.0",
"x11-dl", "x11-dl",
] ]
@ -4833,15 +4765,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "wio"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5"
dependencies = [
"winapi",
]
[[package]] [[package]]
name = "x11-dl" name = "x11-dl"
version = "2.20.1" version = "2.20.1"

View file

@ -10,6 +10,7 @@ NOTE: [`egui-winit`](../egui-winit/CHANGELOG.md), [`egui_glium`](../egui_glium/C
#### Desktop/Native: #### Desktop/Native:
* `eframe::run_native` now returns a `Result` ([#2433](https://github.com/emilk/egui/pull/2433)). * `eframe::run_native` now returns a `Result` ([#2433](https://github.com/emilk/egui/pull/2433)).
* Update to `winit` 0.28, adding support for mac trackpad zoom ([#2654](https://github.com/emilk/egui/pull/2654)).
#### Web: #### Web:
* Prevent ctrl-P/cmd-P from opening the print dialog ([#2598](https://github.com/emilk/egui/pull/2598)). * Prevent ctrl-P/cmd-P from opening the print dialog ([#2598](https://github.com/emilk/egui/pull/2598)).

View file

@ -92,7 +92,7 @@ egui-winit = { version = "0.20.0", path = "../egui-winit", default-features = fa
"links", "links",
] } ] }
raw-window-handle = { version = "0.5.0" } raw-window-handle = { version = "0.5.0" }
winit = "0.27.2" winit = "0.28"
# optional native: # optional native:
dark-light = { version = "1.0", optional = true } dark-light = { version = "1.0", optional = true }

View file

@ -78,7 +78,6 @@ pub fn build_window<E>(
let mut window_builder = winit::window::WindowBuilder::new() let mut window_builder = winit::window::WindowBuilder::new()
.with_title(title) .with_title(title)
.with_always_on_top(*always_on_top)
.with_decorations(*decorated) .with_decorations(*decorated)
.with_fullscreen(fullscreen.then(|| winit::window::Fullscreen::Borderless(None))) .with_fullscreen(fullscreen.then(|| winit::window::Fullscreen::Borderless(None)))
.with_maximized(*maximized) .with_maximized(*maximized)
@ -143,7 +142,16 @@ pub fn build_window<E>(
} }
} }
window_builder.build(event_loop) let window = window_builder.build(event_loop)?;
use winit::window::WindowLevel;
window.set_window_level(if *always_on_top {
WindowLevel::AlwaysOnTop
} else {
WindowLevel::Normal
});
Ok(window)
} }
fn largest_monitor_point_size<E>(event_loop: &EventLoopWindowTarget<E>) -> egui::Vec2 { fn largest_monitor_point_size<E>(event_loop: &EventLoopWindowTarget<E>) -> egui::Vec2 {
@ -235,7 +243,12 @@ pub fn handle_app_output(
} }
if let Some(always_on_top) = always_on_top { if let Some(always_on_top) = always_on_top {
window.set_always_on_top(always_on_top); use winit::window::WindowLevel;
window.set_window_level(if always_on_top {
WindowLevel::AlwaysOnTop
} else {
WindowLevel::Normal
});
} }
} }

View file

@ -363,7 +363,7 @@ mod glow_integration {
// try egl and fallback to x11 glx // try egl and fallback to x11 glx
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
let preference = glutin::display::DisplayApiPreference::EglThenGlx(Box::new( let preference = glutin::display::DisplayApiPreference::EglThenGlx(Box::new(
winit::platform::unix::register_xlib_error_hook, winit::platform::x11::register_xlib_error_hook,
)); ));
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
let preference = glutin::display::DisplayApiPreference::Cgl; let preference = glutin::display::DisplayApiPreference::Cgl;

View file

@ -49,7 +49,7 @@ wgpu = "0.15.0"
## Enable this when generating docs. ## Enable this when generating docs.
document-features = { version = "0.2", optional = true } document-features = { version = "0.2", optional = true }
winit = { version = "0.27.2", optional = true } winit = { version = "0.28", optional = true }
# Native: # Native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]

View file

@ -3,6 +3,7 @@ All notable changes to the `egui-winit` integration will be noted in this file.
## Unreleased ## Unreleased
* Update to `winit` 0.28, adding support for mac trackpad zoom ([#2654](https://github.com/emilk/egui/pull/2654)).
* Remove the `screen_reader` feature. Use the `accesskit` feature flag instead ([#2669](https://github.com/emilk/egui/pull/2669)). * Remove the `screen_reader` feature. Use the `accesskit` feature flag instead ([#2669](https://github.com/emilk/egui/pull/2669)).

View file

@ -50,16 +50,16 @@ instant = { version = "0.1", features = [
"wasm-bindgen", "wasm-bindgen",
] } # We use instant so we can (maybe) compile for web ] } # We use instant so we can (maybe) compile for web
tracing = { version = "0.1", default-features = false, features = ["std"] } tracing = { version = "0.1", default-features = false, features = ["std"] }
winit = { version = "0.27.2", default-features = false } winit = { version = "0.28", default-features = false }
#! ### Optional dependencies #! ### Optional dependencies
# feature accesskit
accesskit_winit = { version = "0.9.0", optional = true }
## Enable this when generating docs. ## Enable this when generating docs.
document-features = { version = "0.2", optional = true } document-features = { version = "0.2", optional = true }
# feature accesskit
accesskit_winit = { version = "0.8.1", optional = true }
puffin = { version = "0.14", optional = true } puffin = { version = "0.14", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] } serde = { version = "1.0", optional = true, features = ["derive"] }
@ -70,3 +70,7 @@ smithay-clipboard = { version = "0.6.3", optional = true }
[target.'cfg(not(target_os = "android"))'.dependencies] [target.'cfg(not(target_os = "android"))'.dependencies]
arboard = { version = "3.2", optional = true, default-features = false } arboard = { version = "3.2", optional = true, default-features = false }
[target.'cfg(target_os = "android")'.dependencies]
# TODO(emilk): this is probably not the right place for specifying native-activity, but we need to do it somewhere for the CI
android-activity = { version = "0.4", features = ["native-activity"] }

View file

@ -25,16 +25,6 @@ pub use window_settings::WindowSettings;
use winit::event_loop::EventLoopWindowTarget; use winit::event_loop::EventLoopWindowTarget;
#[cfg(feature = "wayland")]
#[cfg(any(
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd"
))]
use winit::platform::unix::EventLoopWindowTargetExtUnix;
pub fn native_pixels_per_point(window: &winit::window::Window) -> f32 { pub fn native_pixels_per_point(window: &winit::window::Window) -> f32 {
window.scale_factor() as f32 window.scale_factor() as f32
} }
@ -377,8 +367,9 @@ impl State {
consumed: false, consumed: false,
} }
} }
WindowEvent::AxisMotion { .. }
| WindowEvent::CloseRequested // Things that may require repaint:
WindowEvent::CloseRequested
| WindowEvent::CursorEntered { .. } | WindowEvent::CursorEntered { .. }
| WindowEvent::Destroyed | WindowEvent::Destroyed
| WindowEvent::Occluded(_) | WindowEvent::Occluded(_)
@ -388,10 +379,26 @@ impl State {
repaint: true, repaint: true,
consumed: false, consumed: false,
}, },
WindowEvent::Moved(_) => EventResponse {
repaint: false, // moving a window doesn't warrant a repaint // Things we completely ignore:
WindowEvent::AxisMotion { .. }
| WindowEvent::Moved(_)
| WindowEvent::SmartMagnify { .. }
| WindowEvent::TouchpadRotate { .. } => EventResponse {
repaint: false,
consumed: false, consumed: false,
}, },
WindowEvent::TouchpadMagnify { delta, .. } => {
// Positive delta values indicate magnification (zooming in).
// Negative delta values indicate shrinking (zooming out).
let zoom_factor = (*delta as f32).exp();
self.egui_input.events.push(egui::Event::Zoom(zoom_factor));
EventResponse {
repaint: true,
consumed: egui_ctx.wants_pointer_input(),
}
}
} }
} }
@ -871,6 +878,7 @@ fn wayland_display<T>(_event_loop: &EventLoopWindowTarget<T>) -> Option<*mut c_v
target_os = "openbsd" target_os = "openbsd"
))] ))]
{ {
use winit::platform::wayland::EventLoopWindowTargetExtWayland as _;
return _event_loop.wayland_display(); return _event_loop.wayland_display();
} }

View file

@ -33,7 +33,7 @@ impl GlutinWindowContext {
// try egl and fallback to x11 glx // try egl and fallback to x11 glx
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
let preference = glutin::display::DisplayApiPreference::EglThenGlx(Box::new( let preference = glutin::display::DisplayApiPreference::EglThenGlx(Box::new(
winit::platform::unix::register_xlib_error_hook, winit::platform::x11::register_xlib_error_hook,
)); ));
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
let preference = glutin::display::DisplayApiPreference::Cgl; let preference = glutin::display::DisplayApiPreference::Cgl;