From 60342d44e3fd91c3e3b381439e8b67106a91fd7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 13 Oct 2015 09:51:40 +0200 Subject: [PATCH] Move adjustedSize from Client to AbstractClient --- abstract_client.h | 3 +++ client.h | 3 --- geometry.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/abstract_client.h b/abstract_client.h index cc4fc84e6a..688a5092d0 100644 --- a/abstract_client.h +++ b/abstract_client.h @@ -413,6 +413,9 @@ public: */ virtual QSize sizeForClientSize(const QSize &wsize, Sizemode mode = SizemodeAny, bool noframe = false) const; + QSize adjustedSize(const QSize&, Sizemode mode = SizemodeAny) const; + QSize adjustedSize() const; + virtual bool hasStrut() const; void setModal(bool modal); diff --git a/client.h b/client.h index 6698be4000..d1880cb776 100644 --- a/client.h +++ b/client.h @@ -209,9 +209,6 @@ public: void releaseWindow(bool on_shutdown = false); void destroyClient(); - QSize adjustedSize(const QSize&, Sizemode mode = SizemodeAny) const; - QSize adjustedSize() const; - virtual int desktop() const; void sendToScreen(int screen) override; diff --git a/geometry.cpp b/geometry.cpp index 291e2f7c08..68850f6f0b 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1271,7 +1271,7 @@ void AbstractClient::checkOffscreenPosition(QRect* geom, const QRect& screenArea /*! Adjust the frame size \a frame according to he window's size hints. */ -QSize Client::adjustedSize(const QSize& frame, Sizemode mode) const +QSize AbstractClient::adjustedSize(const QSize& frame, Sizemode mode) const { // first, get the window size for the given frame size s QSize wsize(frame.width() - (borderLeft() + borderRight()), @@ -1284,7 +1284,7 @@ QSize Client::adjustedSize(const QSize& frame, Sizemode mode) const // this helper returns proper size even if the window is shaded // see also the comment in Client::setGeometry() -QSize Client::adjustedSize() const +QSize AbstractClient::adjustedSize() const { return sizeForClientSize(clientSize()); }