Bump winit to 0.28.1

This fixes the following wayland-client error:

	Attempted to dispatch unknown opcode 0 for wl_shm, aborting.
This commit is contained in:
Thomas Gardner 2023-02-19 11:00:48 +11:00
parent f7e88665c6
commit f89602948e
5 changed files with 381 additions and 245 deletions

View file

@ -60,7 +60,7 @@ shellwords = "1.0.0"
surfman = { version = "0.5", features = ["sm-winit", "sm-x11"] }
tinyfiledialogs = "3.0"
webxr = { git = "https://github.com/servo/webxr", features = ["ipc", "glwindow", "headless"] }
winit = "0.24"
winit = "0.28.1"
[target.'cfg(any(target_os = "linux", target_os = "windows"))'.dependencies]
image = "0.24"

View file

@ -31,14 +31,14 @@ impl EventsLoop {
// but on Linux, the event loop requires a X11 server.
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
pub fn new(_headless: bool) -> EventsLoop {
EventsLoop(EventLoop::Winit(Some(winit::event_loop::EventLoop::with_user_event())))
EventsLoop(EventLoop::Winit(Some(winit::event_loop::EventLoopBuilder::with_user_event().build())))
}
#[cfg(any(target_os = "linux", target_os = "macos"))]
pub fn new(headless: bool) -> EventsLoop {
EventsLoop(if headless {
EventLoop::Headless(Arc::new((Mutex::new(false), Condvar::new())))
} else {
EventLoop::Winit(Some(winit::event_loop::EventLoop::with_user_event()))
EventLoop::Winit(Some(winit::event_loop::EventLoopBuilder::with_user_event().build()))
})
}
}