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>
This commit is contained in:
parent
a6161563e6
commit
71df75966d
@ -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;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
Reference in New Issue
Block a user