Move implementation of sendToScreen from Client to AbstractClient
Method is no longer virtual, stub in ShellClient removed.
This commit is contained in:
parent
0e1e85d81c
commit
6049b9ff3c
5 changed files with 5 additions and 13 deletions
|
@ -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);
|
||||
|
|
2
client.h
2
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;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue