From a2094c0cbc196b495a6273d78d8721834a55dec4 Mon Sep 17 00:00:00 2001 From: Andrew Toast Date: Sat, 11 Mar 2023 03:09:08 -0700 Subject: [PATCH 1/2] Update raw_window_handle to 0.5.1 --- Cargo.toml | 2 +- src/win/window.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index eb23f4e5..0863221f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ opengl = ["uuid", "x11/glx"] [dependencies] keyboard-types = { version = "0.6.1", default-features = false } -raw-window-handle = "0.4.2" +raw-window-handle = "0.5.1" [target.'cfg(target_os="linux")'.dependencies] xcb = { version = "0.9", features = ["thread", "xlib_xcb", "dri2"] } diff --git a/src/win/window.rs b/src/win/window.rs index 2af1abed..79c2cba3 100644 --- a/src/win/window.rs +++ b/src/win/window.rs @@ -24,7 +24,7 @@ use std::os::windows::ffi::OsStrExt; use std::ptr::null_mut; use std::rc::Rc; -use raw_window_handle::{HasRawWindowHandle, RawWindowHandle, Win32Handle}; +use raw_window_handle::{HasRawWindowHandle, RawWindowHandle, Win32WindowHandle}; const BV_WINDOW_MUST_CLOSE: UINT = WM_USER + 1; @@ -84,12 +84,12 @@ impl WindowHandle { unsafe impl HasRawWindowHandle for WindowHandle { fn raw_window_handle(&self) -> RawWindowHandle { if let Some(hwnd) = self.hwnd { - let mut handle = Win32Handle::empty(); + let mut handle = Win32WindowHandle::empty(); handle.hwnd = hwnd as *mut c_void; RawWindowHandle::Win32(handle) } else { - RawWindowHandle::Win32(Win32Handle::empty()) + RawWindowHandle::Win32(Win32WindowHandle::empty()) } } } @@ -757,7 +757,7 @@ impl Window<'_> { unsafe impl HasRawWindowHandle for Window<'_> { fn raw_window_handle(&self) -> RawWindowHandle { - let mut handle = Win32Handle::empty(); + let mut handle = Win32WindowHandle::empty(); handle.hwnd = self.state.hwnd as *mut c_void; RawWindowHandle::Win32(handle) From 4e853ddbfeaaabcd9e6f287fe836bb6a1f8257ed Mon Sep 17 00:00:00 2001 From: Andrew Toast Date: Mon, 9 Oct 2023 16:56:05 -0600 Subject: [PATCH 2/2] toml fix --- src/win/window.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/win/window.rs b/src/win/window.rs index 875a175d..0248a1d8 100644 --- a/src/win/window.rs +++ b/src/win/window.rs @@ -26,14 +26,11 @@ use std::os::windows::ffi::OsStrExt; use std::ptr::null_mut; use std::rc::Rc; -<<<<<<< HEAD -use raw_window_handle::{HasRawWindowHandle, RawWindowHandle, Win32WindowHandle}; -======= + use raw_window_handle::{ HasRawDisplayHandle, HasRawWindowHandle, RawDisplayHandle, RawWindowHandle, Win32WindowHandle, WindowsDisplayHandle, }; ->>>>>>> f0639b787bbda506434d3f6b5c91e94ca59904c6 const BV_WINDOW_MUST_CLOSE: UINT = WM_USER + 1;