Browse Source

Update windows dependency to 0.29 (#3132)

Ngo Iok Ui (Wu Yu Wei) 3 years ago
parent
commit
0deaed8c57

+ 3 - 3
core/tauri-runtime-wry/Cargo.toml

@@ -14,7 +14,7 @@ readme = "README.md"
 
 [dependencies]
 #wry = { version = "0.12", default-features = false, features = [ "file-drop", "protocol" ] }
-wry = { git = "https://github.com/tauri-apps/wry", rev = "81e92bd2539a27cd2aa169adc6a52f4f78e00292", default-features = false, features = [ "file-drop", "protocol", "transparent", "fullscreen" ] }
+wry = { git = "https://github.com/tauri-apps/wry", rev = "3284f8d442978269f7654edbdfc9bc51022eaa40", default-features = false, features = [ "file-drop", "protocol", "transparent", "fullscreen" ] }
 tauri-runtime = { version = "0.2.1", path = "../tauri-runtime" }
 tauri-utils = { version = "1.0.0-beta.3", path = "../tauri-utils" }
 uuid = { version = "0.8.2", features = [ "v4" ] }
@@ -22,10 +22,10 @@ infer = "0.4"
 
 [target."cfg(windows)".dependencies]
 ico = "0.1"
-webview2-com = "0.7.0"
+webview2-com = "0.9.0"
 
 [target."cfg(windows)".dependencies.windows]
-version = "0.25.0"
+version = "0.29.0"
 features = [
   "Win32_Foundation",
 ]

+ 6 - 5
core/tauri-runtime-wry/src/lib.rs

@@ -26,11 +26,12 @@ use tauri_runtime::window::MenuEvent;
 #[cfg(feature = "system-tray")]
 use tauri_runtime::{SystemTray, SystemTrayEvent};
 #[cfg(windows)]
-use webview2_com::{
-  FocusChangedEventHandler, Windows::Win32::System::WinRT::EventRegistrationToken,
-};
+use webview2_com::FocusChangedEventHandler;
 #[cfg(windows)]
-use windows::Win32::Foundation::HWND;
+use windows::Win32::{
+    Foundation::HWND,
+    System::WinRT::EventRegistrationToken,
+};
 #[cfg(all(feature = "system-tray", target_os = "macos"))]
 use wry::application::platform::macos::{SystemTrayBuilderExtMacOS, SystemTrayExtMacOS};
 #[cfg(target_os = "linux")]
@@ -1970,7 +1971,7 @@ fn handle_user_message(
           #[cfg(target_os = "macos")]
           WindowMessage::NSWindow(tx) => tx.send(NSWindow(window.ns_window())).unwrap(),
           #[cfg(windows)]
-          WindowMessage::Hwnd(tx) => tx.send(Hwnd(HWND(window.hwnd() as _))).unwrap(),
+          WindowMessage::Hwnd(tx) => tx.send(Hwnd(window.hwnd() as _)).unwrap(),
           #[cfg(any(
             target_os = "linux",
             target_os = "dragonfly",

+ 2 - 2
core/tauri-runtime/Cargo.toml

@@ -33,10 +33,10 @@ http-range = "0.1.4"
 infer = "0.4"
 
 [target."cfg(windows)".dependencies]
-webview2-com = "0.7.0"
+webview2-com = "0.9.0"
 
 [target."cfg(windows)".dependencies.windows]
-version = "0.25.0"
+version = "0.29.0"
 features = [
   "Win32_Foundation",
 ]

+ 1 - 1
core/tauri/src/window.rs

@@ -512,7 +512,7 @@ impl<R: Runtime> Window<R> {
       .window
       .dispatcher
       .hwnd()
-      .map(|hwnd| hwnd.0 as *mut _)
+      .map(|hwnd| hwnd as *mut _)
       .map_err(Into::into)
   }