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>
This commit is contained in:
parent
78203ccf80
commit
a63c7a9382
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user