fix(client): filter invisible windows server-side, log shows real count
This commit is contained in:
parent
e942bbad58
commit
4bad20a24c
1 changed files with 3 additions and 2 deletions
|
|
@ -45,13 +45,14 @@ mod win_impl {
|
|||
for hwnd in hwnds {
|
||||
let visible = unsafe { IsWindowVisible(hwnd).as_bool() };
|
||||
let title = hwnd_title(hwnd);
|
||||
if title.is_empty() {
|
||||
// Only return visible windows with a non-empty title
|
||||
if !visible || title.is_empty() {
|
||||
continue;
|
||||
}
|
||||
windows.push(WindowInfo {
|
||||
id: hwnd.0 as u64,
|
||||
title,
|
||||
visible,
|
||||
visible: true,
|
||||
});
|
||||
}
|
||||
Ok(windows)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue