summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-09-22 14:37:58 +0200
committerQt by Nokia <qt-info@nokia.com>2011-09-23 11:31:21 +0200
commit0bc19b49975bc82185aa24857f2a921584c9684f (patch)
tree7c4dbb914ebc0e40588d083171bba3de2fc65970 /src/widgets
parent294df24621ddd4e08ca792cd8e541dcc84409acb (diff)
Implemented QWidget's move() vs setGeometry() distinction in QWindow.
QWidget's move() sets the position of the window including the window frame, unlike setGeometry(). There was no equivalent for this in QWindow, so several QWidget auto-tests were failing. Now we add setFramePos() to achieve the same purpose in QWindow. This fixes tst_QWidget::windowState(), which uses move(). Change-Id: I9a3e558bd615a8f0234cc3dd94fbb2bf5ecbc148 Reviewed-on: http://codereview.qt-project.org/5405 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index 4c65d08b6a..65ba0fcb5a 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -126,6 +126,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
}
}
+ qt_window_private(win)->positionPolicy = topData()->posFromMove ? QWindowPrivate::WindowFrameInclusive : QWindowPrivate::WindowFrameExclusive;
win->create();
data.window_flags = win->windowFlags();
@@ -661,6 +662,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
if (!q->testAttribute(Qt::WA_DontShowOnScreen) && !q->testAttribute(Qt::WA_OutsideWSRange)) {
if (q->windowHandle()) {
if (q->isWindow()) {
+ qt_window_private(q->windowHandle())->positionPolicy = topData()->posFromMove ? QWindowPrivate::WindowFrameInclusive : QWindowPrivate::WindowFrameExclusive;
q->windowHandle()->setGeometry(q->geometry());
} else {
QPoint posInNativeParent = q->mapTo(q->nativeParentWidget(),QPoint());