Update raw-window-handle to 0.4.1 (#1957)

* Update raw-window-handle to `0.4.2`

See:
- https://github.com/rust-windowing/raw-window-handle/issues/72
- https://github.com/rust-windowing/raw-window-handle/pull/73
- https://github.com/rust-windowing/raw-window-handle/pull/74

* Clean up raw_window_handle functions a bit
This commit is contained in:
Mads Marquart 2021-11-30 17:50:23 +01:00 committed by GitHub
parent 29a078f65c
commit 5eb9c9504b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 39 additions and 52 deletions

View file

@ -1,4 +1,4 @@
use raw_window_handle::unix::XlibHandle;
use raw_window_handle::XlibHandle;
use std::{
cmp, env,
ffi::CString,
@ -1458,10 +1458,9 @@ impl UnownedWindow {
#[inline]
pub fn raw_window_handle(&self) -> XlibHandle {
XlibHandle {
window: self.xwindow,
display: self.xconn.display as _,
..XlibHandle::empty()
}
let mut handle = XlibHandle::empty();
handle.window = self.xlib_window();
handle.display = self.xlib_display();
handle
}
}