From 6049b9ff3ceaf1603cde3700ed62367d843eb0eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 14 Oct 2015 13:37:46 +0200 Subject: [PATCH] Move implementation of sendToScreen from Client to AbstractClient Method is no longer virtual, stub in ShellClient removed. --- abstract_client.h | 2 +- client.h | 2 -- geometry.cpp | 8 ++++---- shell_client.cpp | 5 ----- shell_client.h | 1 - 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/abstract_client.h b/abstract_client.h index 96b62b0469..fcbbbf536b 100644 --- a/abstract_client.h +++ b/abstract_client.h @@ -284,7 +284,7 @@ public: * false for Normal, Dialog, Utility and Menu (and Toolbar??? - not yet) TODO */ bool isSpecialWindow() const; - virtual void sendToScreen(int screen) = 0; + void sendToScreen(int screen); virtual const QKeySequence &shortcut() const = 0; virtual void setShortcut(const QString &cut) = 0; virtual bool performMouseCommand(Options::MouseCommand, const QPoint &globalPos); diff --git a/client.h b/client.h index a91c87af21..878c295b64 100644 --- a/client.h +++ b/client.h @@ -206,8 +206,6 @@ public: virtual int desktop() const; - void sendToScreen(int screen) override; - virtual QStringList activities() const; void setOnActivity(const QString &activity, bool enable); void setOnAllActivities(bool set) override; diff --git a/geometry.cpp b/geometry.cpp index dd1e731bd0..71dcb314e7 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -3361,13 +3361,13 @@ void AbstractClient::setQuickTileMode(QuickTileMode mode, bool keyboard) emit quickTileModeChanged(); } -void Client::sendToScreen(int newScreen) +void AbstractClient::sendToScreen(int newScreen) { newScreen = rules()->checkScreen(newScreen); if (isActive()) { screens()->setCurrent(newScreen); // might impact the layer of a fullscreen window - foreach (Client *cc, workspace()->clientList()) { + foreach (AbstractClient *cc, workspace()->allClientList()) { if (cc->isFullScreen() && cc->screen() == newScreen) { cc->updateLayer(); } @@ -3416,12 +3416,12 @@ void Client::sendToScreen(int newScreen) } // align geom_restore - checkWorkspacePosition operates on it - geom_restore = geometry(); + setGeometryRestore(geometry()); checkWorkspacePosition(oldGeom); // re-align geom_restore to constrained geometry - geom_restore = geometry(); + setGeometryRestore(geometry()); // finally reset special states // NOTICE that MaximizeRestore/QuickTileNone checks are required. diff --git a/shell_client.cpp b/shell_client.cpp index 242885b4c6..1c9af37419 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -416,11 +416,6 @@ const WindowRules *ShellClient::rules() const return &s_rules; } -void ShellClient::sendToScreen(int screen) -{ - Q_UNUSED(screen) -} - void ShellClient::setFullScreen(bool set, bool user) { Q_UNUSED(set) diff --git a/shell_client.h b/shell_client.h index ef7760daa6..c36ea43fe0 100644 --- a/shell_client.h +++ b/shell_client.h @@ -77,7 +77,6 @@ public: } bool noBorder() const override; const WindowRules *rules() const override; - void sendToScreen(int screen) override; void setFullScreen(bool set, bool user = true) override; void setNoBorder(bool set) override; void setOnAllActivities(bool set) override;