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

Bump raw window handle to 0.6.0 #4202

Merged
merged 52 commits into from
Oct 27, 2023

Conversation

TornaxO7
Copy link
Contributor

@TornaxO7 TornaxO7 commented Oct 3, 2023

Checklist

  • Run cargo clippy.
  • Run cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Connections
This PR tries to fix the code of #4193

Description

  • Bumping up the dependency raw-window-handle from 0.5 -> 0.6
  • New error-kind added to CreateSurfaceErrorKind: CreateSurfaceErrorKind::RawHandle(raw_window_handle::HandleError) which holds the error when trying to get the an handler for a Window or a Display.

Testing
TODO

Status
We have to wait for rust-windowing/winit#3126 because winit hasn't bumped raw-window-handle yet, hence I'm getting the following error messages for example:

error[E0277]: the trait bound `Window: raw_window_handle::borrowed::HasDisplayHandle` is not satisfied
    --> examples/hello-windows/src/main.rs:23:56
     |
23   |         let surface = unsafe { instance.create_surface(&window) }.unwrap();
     |                                         -------------- ^^^^^^^ the trait `raw_window_handle::borrowed::HasDisplayHandle` is not implemented for `Window`
     |                                         |
     |                                         required by a bound introduced by this call
     |
     = help: the following other types implement trait `raw_window_handle::borrowed::HasDisplayHandle`:
               Box<H>
               raw_window_handle::borrowed::DisplayHandle<'a>
               Rc<H>
               Arc<H>
               &H
               &mut H
note: required by a bound in `wgpu::Instance::create_surface`
    --> /home/tornax/Programming/pull/wgpu/wgpu/src/lib.rs:1940:49
     |
1939 |     pub unsafe fn create_surface<
     |                   -------------- required by a bound in this associated function
1940 |         W: raw_window_handle::HasWindowHandle + raw_window_handle::HasDisplayHandle,
     |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Instance::create_surface`
                                                                                                                                                                                                       

@TornaxO7 TornaxO7 changed the title Bump raw window handle to 6 0 0 Bump raw window handle to 6.0.0 Oct 3, 2023
wgpu/src/lib.rs Outdated Show resolved Hide resolved
@xStrom
Copy link

xStrom commented Oct 5, 2023

PR title says 6.0.0 which is a typo.

@cwfitzgerald cwfitzgerald changed the title Bump raw window handle to 6.0.0 Bump raw window handle to 0.6.0 Oct 5, 2023
@TornaxO7
Copy link
Contributor Author

TornaxO7 commented Oct 5, 2023

whoops, sorry! Thank you for pointing it out

@Zageron
Copy link

Zageron commented Oct 21, 2023

Winit dependency is in:
https://github.com/rust-windowing/winit/releases/tag/v0.29.2

@TornaxO7
Copy link
Contributor Author

Aye! Will continue this PR!

@TornaxO7
Copy link
Contributor Author

Welp... so the only test which is failing is from codecov... what would you suggest to fix this?

@cwfitzgerald cwfitzgerald marked this pull request as ready for review October 26, 2023 14:58
@cwfitzgerald cwfitzgerald requested a review from a team as a code owner October 26, 2023 14:58
Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Thank you so much!

examples/bunnymark/src/main.rs Show resolved Hide resolved
@cwfitzgerald cwfitzgerald enabled auto-merge (squash) October 27, 2023 05:11
@cwfitzgerald cwfitzgerald merged commit 4c5a817 into gfx-rs:trunk Oct 27, 2023
27 checks passed
@TornaxO7 TornaxO7 deleted the bump_raw_window_handle_to_6_0_0 branch October 27, 2023 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants