node-window-manager icon indicating copy to clipboard operation
node-window-manager copied to clipboard

[Windows] Is it possible to list out windows that are shown on task bar?

Open idiotWu opened this issue 3 years ago • 2 comments

The Problem

Platform: Windows

Currently, windowManager.getWindows() method returns hundreds of application windows, including those are not actually visible (i.e. without having a window frame). I'm wondering if it's possible to filter out those windows and get a list of currently opened windows.

Related Approaches

idiotWu avatar Mar 19 '21 17:03 idiotWu

You can use the method ViewIsShownInSwitchers From the VirtualDesktopAcessor DLL (ffi-napi) it returns >0 if the window is shown on alt+tab/taskbar

nodgear avatar Apr 04 '21 06:04 nodgear

checking window.isVisible() is a good start. Seems to knock the set down from hundreds to a handful, although still not all the way down to 1 for some apps...

NNskelly avatar Jan 18 '23 21:01 NNskelly