summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index c2c093faf4..220c36cc19 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -2808,15 +2808,16 @@ void QWindowsWindow::calculateFullFrameMargins()
const auto systemMargins = testFlag(DisableNonClientScaling)
? QWindowsGeometryHint::frameOnPrimaryScreen(window(), m_data.hwnd)
: frameMargins_sys();
+ const QMargins actualMargins = systemMargins + customMargins();
const int yDiff = (windowRect.bottom - windowRect.top) - (clientRect.bottom - clientRect.top);
- const bool typicalFrame = (systemMargins.left() == systemMargins.right())
- && (systemMargins.right() == systemMargins.bottom());
+ const bool typicalFrame = (actualMargins.left() == actualMargins.right())
+ && (actualMargins.right() == actualMargins.bottom());
const QMargins adjustedMargins = typicalFrame ?
- QMargins(systemMargins.left(), (yDiff - systemMargins.bottom()),
- systemMargins.right(), systemMargins.bottom())
- : systemMargins + customMargins();
+ QMargins(actualMargins.left(), (yDiff - actualMargins.bottom()),
+ actualMargins.right(), actualMargins.bottom())
+ : actualMargins;
setFullFrameMargins(adjustedMargins);
}