Skip to content

Commit

Permalink
Missed one
Browse files Browse the repository at this point in the history
  • Loading branch information
notgull committed Jul 10, 2023
1 parent d8b1358 commit 4f1a9f1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,14 @@ unsafe impl<T> HasRawDisplayHandle for EventLoopWindowTarget<T> {
}
}

impl<T> HasDisplayHandle for EventLoopWindowTarget<T> {
fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError> {
// SAFETY: The returned display handle is always valid for this lifetime.
self.raw_display_handle()
.map(|handle| unsafe { DisplayHandle::borrow_raw(handle) })
}
}

unsafe impl<T> raw_window_handle_05::HasRawDisplayHandle for EventLoopWindowTarget<T> {
fn raw_display_handle(&self) -> raw_window_handle_05::RawDisplayHandle {
let result = HasRawDisplayHandle::raw_display_handle(self);
Expand Down

0 comments on commit 4f1a9f1

Please sign in to comment.