On Mon Jun 3 10:45:03 2024 +0000, Zhiyi Zhang wrote:
Well, I don't know if we need to replicate that?
It's probably added because Android's onSizeChanged() always reports physical size. And the desktop window might be running with a different DPI and DPI awareness context.
We could also make explorer process explicitly change its awareness on
startup, and maybe that's something we should do regardless? NtUserSetWindowPos() calls map_dpi_winpos() to map DPI, and map_dpi_winpos() in turn calls get_dpi_for_window(), which uses get_monitor_dpi() and get_monitor_dpi() always uses the primary monitor DPI. So the desktop window is not per-monitor aware and we should probably keep the `NtUserSetThreadDpiAwarenessContext` call.
Right, looks like there's some inconsistencies between `get_window_dpi_awareness_context` and `get_dpi_for_window`.