Move checkOffscreenPosition from Client to AbstractClient

This commit is contained in:
Martin Gräßlin 2015-10-12 10:50:20 +02:00
parent 53b87dbbd9
commit 78e9a56cd1
3 changed files with 4 additions and 3 deletions

View file

@ -525,6 +525,9 @@ protected:
}
QRect electricBorderMaximizeGeometry(QPoint pos, int desktop);
// geometry handling
void checkOffscreenPosition(QRect *geom, const QRect &screenArea);
private:
void handlePaletteChange();
QSharedPointer<TabBox::TabBoxClientImpl> m_tabBoxClient;

View file

@ -635,8 +635,6 @@ private:
xcb_timestamp_t readUserCreationTime() const;
void startupIdChanged();
void checkOffscreenPosition (QRect* geom, const QRect& screenArea);
void updateInputWindow();
bool tabTo(Client *other, bool behind, bool activate);

View file

@ -1254,7 +1254,7 @@ void Client::checkWorkspacePosition(QRect oldGeometry, int oldDesktop, QRect old
setGeometry(newGeom);
}
void Client::checkOffscreenPosition(QRect* geom, const QRect& screenArea)
void AbstractClient::checkOffscreenPosition(QRect* geom, const QRect& screenArea)
{
if (geom->left() > screenArea.right()) {
geom->moveLeft(screenArea.right() - screenArea.width()/4);