Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix X11 build error #283

Merged
merged 2 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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