get-windows icon indicating copy to clipboard operation
get-windows copied to clipboard

Difference between a full-screen window size and screen resolution

Open guillaumemeyer opened this issue 5 years ago • 6 comments

The display settings are 2256*1504 on my laptop. But when the active window is full-screen, the activeWin() promise returns the following bounds:

{ x: -7, y: -7, width: 1519, height: 977 }

This is a real difference! Maybe I just missed something...

P.S: this module is exactly what I was looking for, thanks @sindresorhus

guillaumemeyer avatar Dec 01 '19 04:12 guillaumemeyer

What operating system?

sindresorhus avatar Dec 01 '19 05:12 sindresorhus

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.

albinekb avatar Dec 02 '19 12:12 albinekb

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.

guillaumemeyer avatar Dec 04 '19 15:12 guillaumemeyer

Any solutions for this issue?

anis-dr avatar Dec 11 '21 22:12 anis-dr

It might be possible to make it DPI aware while running: https://github.com/luapower/winapi/blob/master/winapi/dpiaware.lua

sindresorhus avatar Jan 27 '22 13:01 sindresorhus