diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2021-06-22 09:18:13 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2021-08-06 13:02:44 +0200 |
commit | 6336b5350b68e6430a7585d6658a9d653689186f (patch) | |
tree | ae53accd525bc4268637435a9bdb3f28dab6b30e /src/plugins/platforms/windows/openglblacklists | |
parent | f9883865606b7b31396f673fd07a163d911c61f5 (diff) |
Improve WM_DPICHANGED handling
Resize QPlatformWindow on DPI change, so that QWindow
size can stay approximately constant.
For example, a 100x100 QWindow at 100% scaling will
have a 100x100 QPlatformWindow. If the scaling is changed
to 200% then the QPlatformWindow is resized to 200x200,
while the size of the QWindow stays at at 100x100.
In practice the QWindow size will also change slightly,
due to inaccuracies in how we adjust for the size of the
non-client window area. This will be addressed in a later commit.
We can get DPI change independently of screen change,
so no resizing should happen in screen change events.
Disable the resize code in QGuiApplication for Q_OS_WIN,
and remove the WithinDpiChanged flag.
The new flow for handling DPI change is:
1) Send screen change (if any), so that the correct
screen will be used when calculating scale factors
during the following resize.
2) Resize the native window, which will trigger geometry
change events, possibly also for the QWindow.
3) Resize child windows; WM_DPICHANGED is sent to
top-level windows only.
Fixes: QTBUG-89294
Pick-to: 6.2
Change-Id: I0e2d44bae72d20ebdafc3d410db7be9964ad851b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/openglblacklists')
0 files changed, 0 insertions, 0 deletions