diff --git a/geometry.cpp b/geometry.cpp index e689e14e4d..ecef03d5da 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -400,7 +400,7 @@ int Workspace::oldDisplayHeight() const effective snap zones. When 1.0, it means that the snap zones will be used without change. */ -QPoint Workspace::adjustClientPosition(Client* c, QPoint pos, bool unrestricted, double snapAdjust) +QPoint Workspace::adjustClientPosition(AbstractClient* c, QPoint pos, bool unrestricted, double snapAdjust) { QSize borderSnapZone(options->borderSnapZone(), options->borderSnapZone()); QRect maxRect; @@ -487,8 +487,7 @@ QPoint Workspace::adjustClientPosition(Client* c, QPoint pos, bool unrestricted, // windows snap int snap = options->windowSnapZone() * snapAdjust; if (snap) { - QList::ConstIterator l; - for (l = clients.constBegin(); l != clients.constEnd(); ++l) { + for (auto l = m_allClients.constBegin(); l != m_allClients.constEnd(); ++l) { if ((*l) == c) continue; if ((*l)->isMinimized()) diff --git a/workspace.h b/workspace.h index b055fb8b17..6b8b28ea53 100644 --- a/workspace.h +++ b/workspace.h @@ -172,7 +172,7 @@ public: */ void setClientIsMoving(AbstractClient* c); - QPoint adjustClientPosition(Client* c, QPoint pos, bool unrestricted, double snapAdjust = 1.0); + QPoint adjustClientPosition(AbstractClient* c, QPoint pos, bool unrestricted, double snapAdjust = 1.0); QRect adjustClientSize(Client* c, QRect moveResizeGeom, int mode); void raiseClient(AbstractClient* c, bool nogroup = false); void lowerClient(AbstractClient* c, bool nogroup = false);