Reshuffle desktop and activity related code in Window
Keep virtual desktop and activity related code spatially close to improve code readability.
This commit is contained in:
parent
712a23bd59
commit
abb9b0d2cd
2 changed files with 30 additions and 36 deletions
|
@ -853,10 +853,6 @@ void Window::doSetDesktop()
|
|||
{
|
||||
}
|
||||
|
||||
void Window::doSetOnActivities(const QStringList &activityList)
|
||||
{
|
||||
}
|
||||
|
||||
void Window::enterDesktop(VirtualDesktop *virtualDesktop)
|
||||
{
|
||||
if (m_desktops.contains(virtualDesktop)) {
|
||||
|
@ -3229,6 +3225,10 @@ void Window::setOnActivities(const QStringList &newActivitiesList)
|
|||
#endif
|
||||
}
|
||||
|
||||
void Window::doSetOnActivities(const QStringList &activityList)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* if @p all is true, sets on all activities.
|
||||
* if it's false, sets it to only be on the current activity
|
||||
|
|
58
src/window.h
58
src/window.h
|
@ -639,18 +639,35 @@ public:
|
|||
virtual bool isOutline() const;
|
||||
virtual bool isInternal() const;
|
||||
|
||||
QVector<VirtualDesktop *> desktops() const;
|
||||
virtual QStringList activities() const;
|
||||
bool isOnDesktop(VirtualDesktop *desktop) const;
|
||||
bool isOnActivity(const QString &activity) const;
|
||||
bool isOnCurrentDesktop() const;
|
||||
bool isOnCurrentActivity() const;
|
||||
bool isOnAllDesktops() const;
|
||||
bool isOnAllActivities() const;
|
||||
bool isLockScreenOverlay() const;
|
||||
|
||||
void setLockScreenOverlay(bool allowed);
|
||||
|
||||
QStringList desktopIds() const;
|
||||
QVector<VirtualDesktop *> desktops() const;
|
||||
void setDesktops(QVector<VirtualDesktop *> desktops);
|
||||
void enterDesktop(VirtualDesktop *desktop);
|
||||
void leaveDesktop(VirtualDesktop *desktop);
|
||||
bool isOnDesktop(VirtualDesktop *desktop) const;
|
||||
bool isOnCurrentDesktop() const;
|
||||
bool isOnAllDesktops() const;
|
||||
void setOnAllDesktops(bool set);
|
||||
|
||||
virtual QStringList activities() const;
|
||||
bool isOnActivity(const QString &activity) const;
|
||||
bool isOnCurrentActivity() const;
|
||||
bool isOnAllActivities() const;
|
||||
void setOnActivity(const QString &activity, bool enable);
|
||||
void setOnActivities(const QStringList &newActivitiesList);
|
||||
void setOnAllActivities(bool all);
|
||||
virtual void updateActivities(bool includeTransients);
|
||||
void blockActivityUpdates(bool b = true);
|
||||
|
||||
/**
|
||||
* Refresh Window's cache of activites
|
||||
* Called when activity daemon status changes
|
||||
*/
|
||||
virtual void checkActivities(){};
|
||||
|
||||
virtual QString windowRole() const;
|
||||
QString resourceName() const;
|
||||
QString resourceClass() const;
|
||||
|
@ -903,17 +920,6 @@ public:
|
|||
}
|
||||
void setShortcut(const QString &cut);
|
||||
bool performMouseCommand(Options::MouseCommand, const QPointF &globalPos);
|
||||
void setOnAllDesktops(bool set);
|
||||
void enterDesktop(VirtualDesktop *desktop);
|
||||
void leaveDesktop(VirtualDesktop *desktop);
|
||||
|
||||
/**
|
||||
* Set the window as being on the attached list of desktops
|
||||
* On X11 it will be set to the last entry
|
||||
*/
|
||||
void setDesktops(QVector<VirtualDesktop *> desktops);
|
||||
|
||||
QStringList desktopIds() const;
|
||||
|
||||
void setMinimized(bool set);
|
||||
bool isMinimized() const
|
||||
|
@ -969,18 +975,6 @@ public:
|
|||
virtual bool userCanSetNoBorder() const;
|
||||
virtual void checkNoBorder();
|
||||
|
||||
/**
|
||||
* Refresh Window's cache of activites
|
||||
* Called when activity daemon status changes
|
||||
*/
|
||||
virtual void checkActivities(){};
|
||||
|
||||
void setOnActivity(const QString &activity, bool enable);
|
||||
void setOnActivities(const QStringList &newActivitiesList);
|
||||
void setOnAllActivities(bool all);
|
||||
virtual void updateActivities(bool includeTransients);
|
||||
void blockActivityUpdates(bool b = true);
|
||||
|
||||
const WindowRules *rules() const
|
||||
{
|
||||
return &m_rules;
|
||||
|
|
Loading…
Reference in a new issue