mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 23:23:14 -04:00
Implement raw_window_handle::HasRawWindowHandle for Window type (#1105)
* Implement raw_window_handle::HasRawWindowHandle for Window type * Format * Address compilation issues * Fix Linux build hopefully * Fix iOS build
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use raw_window_handle::unix::X11Handle;
|
||||
use std::{
|
||||
cmp,
|
||||
collections::HashSet,
|
||||
@@ -1375,4 +1376,13 @@ impl UnownedWindow {
|
||||
.unwrap()
|
||||
.insert(WindowId(self.xwindow));
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn raw_window_handle(&self) -> X11Handle {
|
||||
X11Handle {
|
||||
window: self.xwindow,
|
||||
display: self.xconn.display as _,
|
||||
..X11Handle::empty()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user