Skip to content

Commit

Permalink
All surfaces now implement RWH traits
Browse files Browse the repository at this point in the history
  • Loading branch information
jgcodes2020 committed Oct 24, 2024
1 parent dcc96a7 commit 236e2ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1336,14 +1336,14 @@ impl std::hash::Hash for dyn Window + '_ {
}

#[cfg(feature = "rwh_06")]
impl rwh_06::HasDisplayHandle for dyn Window + '_ {
impl rwh_06::HasDisplayHandle for dyn Surface + '_ {
fn display_handle(&self) -> Result<rwh_06::DisplayHandle<'_>, rwh_06::HandleError> {
self.rwh_06_display_handle().display_handle()
}
}

#[cfg(feature = "rwh_06")]
impl rwh_06::HasWindowHandle for dyn Window + '_ {
impl rwh_06::HasWindowHandle for dyn Surface + '_ {
fn window_handle(&self) -> Result<rwh_06::WindowHandle<'_>, rwh_06::HandleError> {
self.rwh_06_window_handle().window_handle()
}
Expand Down

0 comments on commit 236e2ba

Please sign in to comment.