summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp8
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;