Skip to content

Commit

Permalink
Fix X11 build error (#283)
Browse files Browse the repository at this point in the history
* Fix X11 build error from rwh 0.6's usage of a NonNull

* Add X11 to CI workflow
  • Loading branch information
Nopey committed Apr 11, 2024
1 parent b683ecc commit 3722893
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
include:
# rust stable
- os: ubuntu-22.04
features: "--features sm-wayland-default"
features: "--features 'sm-x11 sm-wayland-default'"
rust: stable
target: "default"
- os: ubuntu-22.04
Expand Down
5 changes: 4 additions & 1 deletion surfman/src/platform/unix/x11/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,10 @@ impl Connection {
use rwh_06::RawDisplayHandle::Xlib;
use rwh_06::XlibDisplayHandle;
let display = match handle.as_raw() {
Xlib(XlibDisplayHandle { display, .. }) => display as *mut Display,
Xlib(XlibDisplayHandle {
display: Some(display),
..
}) => display.as_ptr() as *mut Display,
Xcb(_) => return Err(Error::Unimplemented),
_ => return Err(Error::IncompatibleRawDisplayHandle),
};
Expand Down

0 comments on commit 3722893

Please sign in to comment.