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:
parent
29a078f65c
commit
5eb9c9504b
9 changed files with 39 additions and 52 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use raw_window_handle::{macos::MacOSHandle, RawWindowHandle};
|
||||
use raw_window_handle::{AppKitHandle, RawWindowHandle};
|
||||
use std::{
|
||||
collections::VecDeque,
|
||||
f64,
|
||||
|
|
@ -1059,12 +1059,10 @@ impl UnownedWindow {
|
|||
|
||||
#[inline]
|
||||
pub fn raw_window_handle(&self) -> RawWindowHandle {
|
||||
let handle = MacOSHandle {
|
||||
ns_window: *self.ns_window as *mut _,
|
||||
ns_view: *self.ns_view as *mut _,
|
||||
..MacOSHandle::empty()
|
||||
};
|
||||
RawWindowHandle::MacOS(handle)
|
||||
let mut handle = AppKitHandle::empty();
|
||||
handle.ns_window = *self.ns_window as *mut _;
|
||||
handle.ns_view = *self.ns_view as *mut _;
|
||||
RawWindowHandle::AppKit(handle)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue