summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.cpp
diff options
context:
space:
mode:
authorDavid Edmundson <davidedmundson@kde.org>2015-08-21 18:03:46 +0100
committerDavid Edmundson <davidedmundson@kde.org>2015-09-22 14:22:59 +0000
commit71df75966db5f51c66bff1c436dd1cb5a895b51b (patch)
tree8d1f9c1998a396f4f55c3596f8ab17978a54679a /src/gui/kernel/qwindow.cpp
parenta6161563e65b398b0e16ed35e97c8828a0ec0526 (diff)
Set positionAutomatic when using setX setY
QWindow keeps track of whether a position has been explicitly set by use of a flag positionAutomatic which gets set in setGeometry. This is used to determine if position is passed to the window manager. However calls to setX, setY via properties did not update this flag if the caller is setting it to the default position 0,0. This patch fixes that by making sure the flag is always updated. Change-Id: I2c0c002fe57efa101b3ca79e6e8b3f36cc465761 Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r--src/gui/kernel/qwindow.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index b54e85a1d3..871437efb1 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -1270,8 +1270,11 @@ void QWindow::setMinimumSize(const QSize &size)
*/
void QWindow::setX(int arg)
{
+ Q_D(QWindow);
if (x() != arg)
setGeometry(QRect(arg, y(), width(), height()));
+ else
+ d->positionAutomatic = false;
}
/*!
@@ -1280,8 +1283,11 @@ void QWindow::setX(int arg)
*/
void QWindow::setY(int arg)
{
+ Q_D(QWindow);
if (y() != arg)
setGeometry(QRect(x(), arg, width(), height()));
+ else
+ d->positionAutomatic = false;
}
/*!