nvda icon indicating copy to clipboard operation
nvda copied to clipboard

Mouse tracking does not work well with display scaling.

Open feerrenrut opened this issue 7 years ago • 4 comments

Using multiple monitors on Windows 10. Set different scaling percentages in the display settings dialog for each monitor. Notice that the object that is under the mouse is not the object being read.

Setting both monitors to 100% results in the objects being reported correctly. Its worth noting that the objects reported may not even be in the same window as the mouse. For instance, the mouse may be over a notepad window, and the task bar is being reported.

feerrenrut avatar Jan 12 '17 09:01 feerrenrut

It's worth noting that NVDA reports as being DPI aware, but only of the system DPI. That is, the system doesn't have to scale it for values other than 100% if the DPI doesn't change, but if the DPI changes (or I assume if you're using multiple monitors with different DPI), the system will scale it to the system DPI value fetched when NVDA starts. For reference, we use SetProcessDPIAware. The new function is SetProcessDpiAwareness, which supports the new PROCESS_PER_MONITOR_DPI_AWARE awareness level.

That said, this doesn't quite explain what you're seeing. The point of DPI scaling is that the system is supposed to scale coordinates for unaware apps so they're reasonably accurate. The reason we switched to being DPI aware was because this was slightly inaccurate in some cases, but you shouldn't be seeing inaccuracy to the degree you're seeing.

My concern with becoming "per monitor DPI aware" is that we then have to figure out which monitor we're dealing with when we do have to scale coordinates. I'm also not sure if wx handles this, which could mean weirdness in our GUI if a user plugs in a different monitor or changes DPI at runtime. (Right now, the system will transparently scale our GUI if this happens.)

See also #3758, #3703.

jcsteh avatar Jan 12 '17 11:01 jcsteh

While this is on a single monitor, I ran into very similar problems in #4703.

dkager avatar Jan 14 '17 14:01 dkager

cc: @leonardder this might be also of interest for you at Babbage.

Adriani90 avatar Mar 30 '19 18:03 Adriani90

Following a query about this from a user, I tested this again and found the issue is still present with NVDA 2022.2beta3 on Windows 11 (64-bit) Version: 21H2 (2009), Build: 22000.778

Qchristensen avatar Jul 06 '22 02:07 Qchristensen