mirror of
https://github.com/tauri-apps/global-hotkey.git
synced 2026-01-31 00:45:22 +01:00
chore(deps): update windows-sys crate to 0.59
This commit is contained in:
5
.changes/send-sync.md
Normal file
5
.changes/send-sync.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"global-hotkey": "minor"
|
||||
---
|
||||
|
||||
Removed `Sync` and `Send` implementation for `GlobalHotKeyManager`
|
||||
5
.changes/windows-sys-0.59.md
Normal file
5
.changes/windows-sys-0.59.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"global-hotkey": "patch"
|
||||
---
|
||||
|
||||
Update `windows-sys` crate to `0.59`
|
||||
@@ -26,7 +26,7 @@ cocoa = "0.25"
|
||||
objc = "0.2"
|
||||
|
||||
[target."cfg(target_os = \"windows\")".dependencies.windows-sys]
|
||||
version = "0.52"
|
||||
version = "0.59"
|
||||
features = [
|
||||
"Win32_UI_WindowsAndMessaging",
|
||||
"Win32_Foundation",
|
||||
|
||||
12
src/lib.rs
12
src/lib.rs
@@ -161,15 +161,3 @@ impl GlobalHotKeyManager {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
fn assert_send<T: Send>() {}
|
||||
fn assert_sync<T: Sync>() {}
|
||||
|
||||
#[test]
|
||||
fn is_send_sync() {
|
||||
assert_send::<super::GlobalHotKeyManager>();
|
||||
assert_sync::<super::GlobalHotKeyManager>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ use windows_sys::Win32::{
|
||||
UI::{
|
||||
Input::KeyboardAndMouse::*,
|
||||
WindowsAndMessaging::{
|
||||
CreateWindowExW, DefWindowProcW, DestroyWindow, RegisterClassW, CW_USEDEFAULT, HMENU,
|
||||
CreateWindowExW, DefWindowProcW, DestroyWindow, RegisterClassW, CW_USEDEFAULT,
|
||||
WM_HOTKEY, WNDCLASSW, WS_EX_LAYERED, WS_EX_NOACTIVATE, WS_EX_TOOLWINDOW,
|
||||
WS_EX_TRANSPARENT, WS_OVERLAPPED,
|
||||
},
|
||||
@@ -20,7 +20,7 @@ use windows_sys::Win32::{
|
||||
use crate::{hotkey::HotKey, GlobalHotKeyEvent};
|
||||
|
||||
pub struct GlobalHotKeyManager {
|
||||
hwnd: isize,
|
||||
hwnd: HWND,
|
||||
}
|
||||
|
||||
impl Drop for GlobalHotKeyManager {
|
||||
@@ -61,12 +61,12 @@ impl GlobalHotKeyManager {
|
||||
0,
|
||||
CW_USEDEFAULT,
|
||||
0,
|
||||
HWND::default(),
|
||||
HMENU::default(),
|
||||
std::ptr::null_mut(),
|
||||
std::ptr::null_mut(),
|
||||
hinstance,
|
||||
std::ptr::null_mut(),
|
||||
);
|
||||
if hwnd == 0 {
|
||||
if hwnd.is_null() {
|
||||
return Err(crate::Error::OsError(std::io::Error::last_os_error()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user