From b8f89d8ef3f695746a8a48084d8ea710eb508d3d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 22 Feb 2016 16:23:39 +0100 Subject: [PATCH] Windows QPA: Use window flags stored in QWindowsWindow for frame geometry. Querying the flags of the QWindow fails when inside QWindowsWindow::setWindowFlags() since the new flags do not take effect. Task-number: QTBUG-40578 Task-number: QTBUG-51224 Change-Id: Ida8c23b64ddfde34ebc0af95c84954e666865240 Reviewed-by: Oliver Wolff --- src/plugins/platforms/windows/qwindowswindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 2ff71d827b..cb733ed5bd 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1914,7 +1914,7 @@ QMargins QWindowsWindow::frameMargins() const // Always skip calculating style-dependent margins for windows claimed to be frameless. // This allows users to remove the margins by handling WM_NCCALCSIZE with WS_THICKFRAME set // to ensure Areo snap still works (QTBUG-40578). - m_data.frame = window()->flags() & Qt::FramelessWindowHint + m_data.frame = m_data.flags & Qt::FramelessWindowHint ? QMargins(0, 0, 0, 0) : QWindowsGeometryHint::frame(style(), exStyle()); clearFlag(FrameDirty);