Update raw-window-handle to v0.5.0

This updates raw-window-handle to v0.5.0.
This commit is contained in:
Kirill Chibisov 2022-07-21 22:22:36 +03:00 committed by GitHub
parent 3e991e13dc
commit 653bc59813
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 177 additions and 56 deletions

View file

@ -13,6 +13,7 @@ use std::{error, fmt};
use instant::Instant;
use once_cell::sync::OnceCell;
use raw_window_handle::{HasRawDisplayHandle, RawDisplayHandle};
use crate::{event::Event, monitor::MonitorHandle, platform_impl};
@ -337,6 +338,13 @@ impl<T> EventLoopWindowTarget<T> {
}
}
unsafe impl<T> HasRawDisplayHandle for EventLoopWindowTarget<T> {
/// Returns a [`raw_window_handle::RawDisplayHandle`] for the event loop.
fn raw_display_handle(&self) -> RawDisplayHandle {
self.p.raw_display_handle()
}
}
/// Used to send custom events to [`EventLoop`].
pub struct EventLoopProxy<T: 'static> {
event_loop_proxy: platform_impl::EventLoopProxy<T>,