Workspace::adjustClientSize operates on AbstractClient

And now also during resizing clients snap to ShellClients.
This commit is contained in:
Martin Gräßlin 2015-09-18 14:05:19 +02:00
parent 47d2b4cb49
commit 6dc211dfaf
2 changed files with 3 additions and 4 deletions

View file

@ -582,7 +582,7 @@ QPoint Workspace::adjustClientPosition(AbstractClient* c, QPoint pos, bool unres
return pos; 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 //adapted from adjustClientPosition on 29May2004
//this function is called when resizing a window and will modify //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) { if (snap) {
deltaX = int(snap); deltaX = int(snap);
deltaY = int(snap); deltaY = int(snap);
QList<Client *>::ConstIterator l; for (auto l = m_allClients.constBegin(); l != m_allClients.constEnd(); ++l) {
for (l = clients.constBegin(); l != clients.constEnd(); ++l) {
if ((*l)->isOnDesktop(VirtualDesktopManager::self()->current()) && if ((*l)->isOnDesktop(VirtualDesktopManager::self()->current()) &&
!(*l)->isMinimized() !(*l)->isMinimized()
&& (*l) != c) { && (*l) != c) {

View file

@ -173,7 +173,7 @@ public:
void setClientIsMoving(AbstractClient* c); void setClientIsMoving(AbstractClient* c);
QPoint adjustClientPosition(AbstractClient* 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); QRect adjustClientSize(AbstractClient* c, QRect moveResizeGeom, int mode);
void raiseClient(AbstractClient* c, bool nogroup = false); void raiseClient(AbstractClient* c, bool nogroup = false);
void lowerClient(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); void raiseClientRequest(AbstractClient* c, NET::RequestSource src = NET::FromApplication, xcb_timestamp_t timestamp = 0);