From 6dc211dfaf0cd9b4b51b1466508af3a9d65773f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 18 Sep 2015 14:05:19 +0200 Subject: [PATCH] Workspace::adjustClientSize operates on AbstractClient And now also during resizing clients snap to ShellClients. --- geometry.cpp | 5 ++--- workspace.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index ecef03d5da..e0099fe85a 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -582,7 +582,7 @@ QPoint Workspace::adjustClientPosition(AbstractClient* c, QPoint pos, bool unres return pos; } -QRect Workspace::adjustClientSize(Client* c, QRect moveResizeGeom, int mode) +QRect Workspace::adjustClientSize(AbstractClient* c, QRect moveResizeGeom, int mode) { //adapted from adjustClientPosition on 29May2004 //this function is called when resizing a window and will modify @@ -683,8 +683,7 @@ QRect Workspace::adjustClientSize(Client* c, QRect moveResizeGeom, int mode) if (snap) { deltaX = int(snap); deltaY = int(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)->isOnDesktop(VirtualDesktopManager::self()->current()) && !(*l)->isMinimized() && (*l) != c) { diff --git a/workspace.h b/workspace.h index 6b8b28ea53..065306432a 100644 --- a/workspace.h +++ b/workspace.h @@ -173,7 +173,7 @@ public: void setClientIsMoving(AbstractClient* c); QPoint adjustClientPosition(AbstractClient* c, QPoint pos, bool unrestricted, double snapAdjust = 1.0); - QRect adjustClientSize(Client* c, QRect moveResizeGeom, int mode); + QRect adjustClientSize(AbstractClient* c, QRect moveResizeGeom, int mode); void raiseClient(AbstractClient* c, bool nogroup = false); void lowerClient(AbstractClient* c, bool nogroup = false); void raiseClientRequest(AbstractClient* c, NET::RequestSource src = NET::FromApplication, xcb_timestamp_t timestamp = 0);