Skip to content

Commit

Permalink
Auto merge of #247 - atomgardner:update-winit, r=jdm
Browse files Browse the repository at this point in the history
Bump winit to 0.28.1

This fixes the following wayland-client error:

	Attempted to dispatch unknown opcode 0 for wl_shm, aborting.
  • Loading branch information
bors-servo authored Feb 21, 2023
2 parents 7391b66 + 97f4604 commit 64df6b2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions android-example/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ authors = ["Patrick Walton <pcwalton@mimiga.net>"]
edition = "2018"

[lib]
name = "main"
crate_type = ["cdylib"]

[profile.dev]
Expand All @@ -18,6 +19,7 @@ android_logger = "0.8"
gl = "0.14"
jni = "0.13"
log = "0.4"
winit = { version = "0.28.1", features = [ "android-native-activity" ] }

[dependencies.euclid]
version = "0.22"
Expand Down
7 changes: 4 additions & 3 deletions surfman/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ version = "0.1"
optional = true

[dependencies.winit]
version = "0.24.0"
version = "0.28.1"
optional = true

[dependencies.raw-window-handle]
version = "0.3.3"
version = "0.5"
optional = true

[dev-dependencies]
Expand Down Expand Up @@ -88,4 +88,5 @@ wio = "0.2"
winapi = { version = "0.3", features = ["d3d11", "wingdi", "winuser", "libloaderapi"] }

[target.'cfg(target_os = "android")'.dependencies]
"raw-window-handle" = "0.3.3"
raw-window-handle = "0.5"
winit = { version = "0.28.1", features = [ "android-native-activity" ] }
4 changes: 2 additions & 2 deletions surfman/src/platform/android/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ impl Connection {
window: &Window,
) -> Result<NativeWidget, Error> {
use raw_window_handle::HasRawWindowHandle;
use raw_window_handle::RawWindowHandle::Android;
use raw_window_handle::RawWindowHandle::AndroidNdk;
match window.raw_window_handle() {
Android(handle) => Ok(NativeWidget {
AndroidNdk(handle) => Ok(NativeWidget {
native_window: handle.a_native_window as *mut _,
}),
_ => Err(Error::IncompatibleNativeWidget),
Expand Down
2 changes: 1 addition & 1 deletion surfman/src/platform/unix/wayland/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::sync::Arc;
use wayland_sys::client::{wl_display, wl_proxy, WAYLAND_CLIENT_HANDLE};

#[cfg(feature = "sm-winit")]
use winit::platform::unix::WindowExtUnix;
use winit::platform::wayland::WindowExtWayland;
#[cfg(feature = "sm-winit")]
use winit::window::Window;

Expand Down
2 changes: 1 addition & 1 deletion surfman/src/platform/unix/x11/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use std::sync::Arc;
use x11::xlib::{Display, XCloseDisplay, XInitThreads, XLockDisplay, XOpenDisplay, XUnlockDisplay};

#[cfg(feature = "sm-winit")]
use winit::platform::unix::WindowExtUnix;
use winit::platform::x11::WindowExtX11;
#[cfg(feature = "sm-winit")]
use winit::window::Window;

Expand Down

1 comment on commit 64df6b2

@Snowiiii
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:D

Please sign in to comment.