Windows QPA: Handle DPI induced geometry change for frameless windows
Make a manual call to the geometry change handling function after a WM_DPICHANGED event if the window is frameless, since WM_SIZE and WM_MOVE will not be called. Fixes: QTBUG-109429 Pick-to: 6.5 Change-Id: I79b9f386fe120ee3d06d6490d3f31a7a5d7121b0 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
parent
efd9e3a02b
commit
e86fcae221
@ -2009,6 +2009,11 @@ void QWindowsWindow::handleDpiChanged(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
SetWindowPos(hwnd, nullptr, prcNewWindow->left, prcNewWindow->top,
|
||||
prcNewWindow->right - prcNewWindow->left,
|
||||
prcNewWindow->bottom - prcNewWindow->top, SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
// If the window does not have a frame, WM_MOVE and WM_SIZE won't be
|
||||
// called which prevents the content from being scaled appropriately
|
||||
// after a DPI change.
|
||||
if (m_data.flags & Qt::FramelessWindowHint)
|
||||
handleGeometryChange();
|
||||
}
|
||||
|
||||
// Re-apply mask now that we have a new DPI, which have resulted in
|
||||
|
Loading…
Reference in New Issue
Block a user