https://bugs.winehq.org/show_bug.cgi?id=45917
--- Comment #1 from Kimball kdt3rd@gmail.com --- further update:
If I regedit and change HKEY_CURRENT_USER\Control Panel\Desktop\LogPixels from 161 (correct value for my monitor) to 96, then the UI interaction in the battle.net UI is correct, and I can click on the buttons without having to move the buttons to the 0,0 upper left corner of the monitor. This however makes the fonts and such incredibly tiny and unusable on things like regedit and winecfg. Which points to a missing scale somewhere in the code recently added in the previous few releases.
In running with WINEDEBUG=-all,+win,+cursor, I notice the following pattern when moving the mouse around in the Battle.net app:
002b:trace:cursor:X11DRV_GetCursorPos pointer at (475,617) server pos (475,617) 002b:trace:win:GetWindowRect hwnd 0x600d6 (10,10)-(1167,666) 002b:trace:win:WINPOS_WindowFromPoint scope 0x600d6 (283,368) returning 0x600d6 002b:trace:win:TrackMouseEventProc point (283,368) hwnd 0x600d6 hittest 1 002b:trace:win:TrackMouseEventProc tracked pos (374,394), current pos (283,368), hover width 4, hover height 4 002b:trace:win:TrackMouseEventProc hwnd 0x600d6, msg 0118, id 7e93b844, time 218513192 0
when looking at the code for WindowFromPoint, I notice that it ends up calling point_thread_to_win_dpi, which then calls GetDpiForWindow, which then ends up calling either get_monitor_dpi or get_win_monitor_dpi based on which window is being queried. However, both of those have FIXME in them, and additionally, none of that code seems to pay attention to the DpiAwareness bits.
So I presume this is just a missing segment of the DPI awareness implementation. I unfortunately don't know enough of how this is all intended to work to be able to propose a solution, although at first glance, it seems like changing the calls to get_monitor_dpi and get_win_monitor_dpi in GetDpiForWindow to using get_thread_dpi instead may work (although not sure what to do about get_win_monitor_dpi)? I will keep poking at it and see if I can figure out what it is all about, unless someone can pipe in and say "this is what it should be".