From 8a873e49238b4e2609a982ea8074477428f16329 Mon Sep 17 00:00:00 2001 From: Helios Date: Fri, 6 Mar 2026 02:11:20 +0100 Subject: [PATCH] fix: compile errors - GetWindowLongA, Win32_System_ProcessStatus feature --- crates/client/Cargo.toml | 1 + crates/client/src/windows_mgmt.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml index a29b2e2..e7e327a 100644 --- a/crates/client/Cargo.toml +++ b/crates/client/Cargo.toml @@ -40,4 +40,5 @@ windows = { version = "0.54", features = [ "Win32_UI_WindowsAndMessaging", "Win32_UI_Shell", "Win32_System_Console", + "Win32_System_ProcessStatus", ] } diff --git a/crates/client/src/windows_mgmt.rs b/crates/client/src/windows_mgmt.rs index 810ebad..6f766f7 100644 --- a/crates/client/src/windows_mgmt.rs +++ b/crates/client/src/windows_mgmt.rs @@ -8,7 +8,7 @@ mod win_impl { use super::*; use windows::Win32::Foundation::{BOOL, HWND, LPARAM}; use windows::Win32::UI::WindowsAndMessaging::{ - BringWindowToTop, EnumWindows, GetWindowLong, GetWindowTextW, IsIconic, + BringWindowToTop, EnumWindows, GetWindowLongA, GetWindowTextW, IsIconic, IsWindowVisible, SetForegroundWindow, ShowWindow, GWL_EXSTYLE, SW_MAXIMIZE, SW_MINIMIZE, SW_RESTORE, WS_EX_TOOLWINDOW, }; @@ -109,7 +109,7 @@ mod win_impl { } // Exclude tool windows (WS_EX_TOOLWINDOW) - let ex_style = unsafe { GetWindowLong(hwnd, GWL_EXSTYLE) } as u32; + let ex_style = unsafe { GetWindowLongA(hwnd, GWL_EXSTYLE) } as u32; if ex_style & WS_EX_TOOLWINDOW.0 != 0 { return true; }