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,7 +1,7 @@
|
|||
#![cfg(target_os = "windows")]
|
||||
|
||||
use parking_lot::Mutex;
|
||||
use raw_window_handle::{windows::WindowsHandle, RawWindowHandle};
|
||||
use raw_window_handle::{RawWindowHandle, Win32Handle};
|
||||
use std::{
|
||||
cell::Cell,
|
||||
ffi::OsStr,
|
||||
|
|
@ -233,12 +233,10 @@ impl Window {
|
|||
|
||||
#[inline]
|
||||
pub fn raw_window_handle(&self) -> RawWindowHandle {
|
||||
let handle = WindowsHandle {
|
||||
hwnd: self.window.0 as *mut _,
|
||||
hinstance: self.hinstance() as *mut _,
|
||||
..WindowsHandle::empty()
|
||||
};
|
||||
RawWindowHandle::Windows(handle)
|
||||
let mut handle = Win32Handle::empty();
|
||||
handle.hwnd = self.window.0 as *mut _;
|
||||
handle.hinstance = self.hinstance() as *mut _;
|
||||
RawWindowHandle::Win32(handle)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue