diff options
| author | Yuhang Zhao <2546789017@qq.com> | 2022-11-17 15:14:24 +0800 |
|---|---|---|
| committer | Yuhang Zhao <2546789017@qq.com> | 2023-01-23 23:39:16 +0800 |
| commit | 5e0d9a077d28802988182319ae257e9102f0344e (patch) | |
| tree | 769da6ec229dc7e5230dbc9f866126096b773c80 /src/sql/doc/snippets/code | |
| parent | 21baa7623025308a39577e7582c023b1d3ae11d6 (diff) | |
Windows QPA: rework how we set dpi awareness
Qt6's minimum supported platform is Win10 1809, so it should be quite
safe to use DPI_AWARENESS_CONTEXT APIs because they were introduced
in Win10 1607.
This patch removes the use of the PROCESS_DPI_AWARENESS APIs because
they are old (introduced in Win8.1) and most importantly, they can't
handle the new PMv2 and GdiScaled awareness mode.
This refactor also fixed a bug: previously Qt is using GetProcessDpiAwareness()
to get the dpi awareness mode of the current process, however, that API can't
return PMv2, which means even if we are in PMv2 mode, it will still return PMv1
(I've confirmed that locally), and thus Qt is mishandling such cases.
Eg: when judging whether to enable non-client area dpi scaling or not.
Change-Id: I8a8946ba63c863f8c19c27998af2bac97db37ec7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/sql/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions
