[scripting] Make client.activities writable

master
Tiago Corrêa 2020-09-18 15:57:39 +00:00 committed by David Edmundson
parent 79c667ea67
commit 2e93829259
2 changed files with 7 additions and 2 deletions

View File

@ -79,6 +79,11 @@ class KWIN_EXPORT AbstractClient : public Toplevel
*/
Q_PROPERTY(bool onAllDesktops READ isOnAllDesktops WRITE setOnAllDesktops NOTIFY desktopChanged)
/**
* The activities this client is on. If it's on all activities the property is empty.
*/
Q_PROPERTY(QStringList activities READ activities WRITE setOnActivities NOTIFY activitiesChanged)
/**
* The x11 ids for all desktops this client is in. On X11 this list will always have a length of 1
*/
@ -884,6 +889,7 @@ Q_SIGNALS:
void demandsAttentionChanged();
void desktopPresenceChanged(KWin::AbstractClient*, int); // to be forwarded by Workspace
void desktopChanged();
void activitiesChanged(KWin::AbstractClient* client);
void x11DesktopIdsChanged();
void shadeChanged();
void minimizedChanged();

View File

@ -230,7 +230,7 @@ class KWIN_EXPORT Toplevel : public QObject
*/
Q_PROPERTY(int windowType READ windowType)
Q_PROPERTY(QStringList activities READ activities NOTIFY activitiesChanged)
Q_PROPERTY(QStringList activities READ activities)
/**
* Whether this Toplevel is managed by KWin (it has control over its placement and other
@ -608,7 +608,6 @@ Q_SIGNALS:
* schedule a repaint of the scene.
*/
void needsRepaint();
void activitiesChanged(KWin::Toplevel* toplevel);
/**
* Emitted whenever the Toplevel's screen changes. This can happen either in consequence to
* a screen being removed/added or if the Toplevel's geometry changes.