From 2e93829259e5c3852d6ab2d78e3bbb6df8d46228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Corr=C3=AAa?= Date: Fri, 18 Sep 2020 15:57:39 +0000 Subject: [PATCH] [scripting] Make client.activities writable --- abstract_client.h | 6 ++++++ toplevel.h | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/abstract_client.h b/abstract_client.h index 0e830a7512..a60cf0857e 100644 --- a/abstract_client.h +++ b/abstract_client.h @@ -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(); diff --git a/toplevel.h b/toplevel.h index 19a717d001..d159a2af29 100644 --- a/toplevel.h +++ b/toplevel.h @@ -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.