Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window.isVisible() always returns true #40

Open
arejaycola opened this issue Feb 27, 2020 · 3 comments
Open

window.isVisible() always returns true #40

arejaycola opened this issue Feb 27, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@arejaycola
Copy link
Contributor

Bug description
Calling window.isVisible() returns true for every process that is running. Claims that every window is visible.

To Reproduce
windowManager.getWindows().forEach((window) => { if (window.isVisible()) { console.log(window.path); } });

Expected behavior
Should only return true if window is visible.

Screenshots

image

Details:

  • Operating System: Windows 10
  • node-window-manager version: 2.0.1
  • Last known working node-window-manager version:

Additional context

@arejaycola arejaycola added the bug Something isn't working label Feb 27, 2020
@sentialx
Copy link
Owner

sentialx commented Mar 7, 2020

@arejaycola It just checks whether a window has the WS_VISIBLE attribute, according to the WinAPI docs

@xland
Copy link

xland commented Jun 30, 2020

@sentialx
Such these windows is not visible, but the isVisible api return true

C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\SearchUI.exe
C:\Windows\SystemApps\ShellExperienceHost_cw5n1h2txyewy\ShellExperienceHost.exe

@nodgear
Copy link

nodgear commented Nov 23, 2021

@sentialx Such these windows is not visible, but the isVisible api return true

C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\SearchUI.exe
C:\Windows\SystemApps\ShellExperienceHost_cw5n1h2txyewy\ShellExperienceHost.exe

Those are cloaked windows, they return as visible for win32 api because.... Microsoft.
what you have to do is check if they are cloaked before checking if they are visible
use NAPI FFI for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants