Update raw-window-handle to v0.5.0
This updates raw-window-handle to v0.5.0.
This commit is contained in:
parent
3e991e13dc
commit
653bc59813
19 changed files with 177 additions and 56 deletions
|
|
@ -40,6 +40,7 @@ use std::{
|
|||
use libc::{self, setlocale, LC_CTYPE};
|
||||
|
||||
use mio::{unix::SourceFd, Events, Interest, Poll, Token, Waker};
|
||||
use raw_window_handle::{RawDisplayHandle, XlibDisplayHandle};
|
||||
|
||||
use self::{
|
||||
dnd::{Dnd, DndState},
|
||||
|
|
@ -558,6 +559,14 @@ impl<T> EventLoopWindowTarget<T> {
|
|||
.select_xinput_events(self.root, ffi::XIAllMasterDevices, mask)
|
||||
.queue();
|
||||
}
|
||||
|
||||
pub fn raw_display_handle(&self) -> raw_window_handle::RawDisplayHandle {
|
||||
let mut display_handle = XlibDisplayHandle::empty();
|
||||
display_handle.display = self.xconn.display as *mut _;
|
||||
display_handle.screen =
|
||||
unsafe { (self.xconn.xlib.XDefaultScreen)(self.xconn.display as *mut _) };
|
||||
RawDisplayHandle::Xlib(display_handle)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: 'static> EventLoopProxy<T> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue