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 <oliver.wolff@theqtcompany.com>
This commit is contained in:
Friedemann Kleint 2016-02-22 16:23:39 +01:00
parent 0ac8c8698c
commit b8f89d8ef3

View File

@ -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);