Open guillaumemeyer opened 4 years ago
What operating system?
And have you tried this with different fullscreen-apps? Some apps have multiple windows, like photoshop or webstorm IDEs, even though it looks like one window.
OK I found the issue. active-win is not an exe, and therefore doesn't have a manifest file to enable the "dpiAware" option. So when using the win32 api, the node-module doesn't take into account the % of zoom defined in Windows display settings.
Any solutions for this issue?
It might be possible to make it DPI aware while running: https://github.com/luapower/winapi/blob/master/winapi/dpiaware.lua
@guillaumemeyer does Electron's Display.scaleFactor
possibly help with accounting for this?
https://www.electronjs.org/docs/latest/api/structures/display
The display settings are 2256*1504 on my laptop. But when the active window is full-screen, the activeWin() promise returns the following bounds:
This is a real difference! Maybe I just missed something...
P.S: this module is exactly what I was looking for, thanks @sindresorhus