fix(client): filter invisible windows server-side, log shows real count

This commit is contained in:
Helios Agent 2026-03-03 15:35:58 +01:00
parent e942bbad58
commit 4bad20a24c
No known key found for this signature in database
GPG key ID: C8259547CD8309B5

View file

@ -45,13 +45,14 @@ mod win_impl {
for hwnd in hwnds { for hwnd in hwnds {
let visible = unsafe { IsWindowVisible(hwnd).as_bool() }; let visible = unsafe { IsWindowVisible(hwnd).as_bool() };
let title = hwnd_title(hwnd); let title = hwnd_title(hwnd);
if title.is_empty() { // Only return visible windows with a non-empty title
if !visible || title.is_empty() {
continue; continue;
} }
windows.push(WindowInfo { windows.push(WindowInfo {
id: hwnd.0 as u64, id: hwnd.0 as u64,
title, title,
visible, visible: true,
}); });
} }
Ok(windows) Ok(windows)