diff options
author | Thomas McGuire <thomas.mcguire.qnx@kdab.com> | 2012-07-10 11:00:36 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-11 14:52:17 +0200 |
commit | a63c7a93828dbda11ae6ec2ef9ed3701141ba36e (patch) | |
tree | 0b065613989db52a601c845660f2d8f6630cf673 /src | |
parent | 78203ccf8047151fd12a39816b2e15e210414388 (diff) |
Don't set the resize and move flags when activating fullscreen mode
This fixes tst_QWidget::movedAndResizedAttributes() for platforms
that don't have support for QPlatformWindow::setWindowState().
Change-Id: Id0f123d11b08a75c0c131080d509e6b23b281600
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/kernel/qwidget_qpa.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp index ec6d10d0b6..9a31373981 100644 --- a/src/widgets/kernel/qwidget_qpa.cpp +++ b/src/widgets/kernel/qwidget_qpa.cpp @@ -621,6 +621,9 @@ void QWidget::setWindowState(Qt::WindowStates newstate) bool supported = windowHandle()->windowState() == newEffectiveState; if (!supported) { + const bool wasResized = testAttribute(Qt::WA_Resized); + const bool wasMoved = testAttribute(Qt::WA_Moved); + // undo the effects of the old emulated state if (oldEffectiveState == Qt::WindowFullScreen) { setParent(0, d->topData()->savedFlags); @@ -651,6 +654,11 @@ void QWidget::setWindowState(Qt::WindowStates newstate) setGeometry(r); } } + + // setWindowState() is not an explicit move/resize, same as the supported == true + // case + setAttribute(Qt::WA_Resized, wasResized); + setAttribute(Qt::WA_Moved, wasMoved); } } data->in_set_window_state = 0; |