From 5f7eab206defbf9ada91063ba0e3c7728b21e7cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 11 Dec 2013 11:13:47 +0100 Subject: [PATCH] [kwin] Introduce a currentChanged signal in screens --- screens.cpp | 1 + screens.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/screens.cpp b/screens.cpp index c351c7e12e..42d4304080 100644 --- a/screens.cpp +++ b/screens.cpp @@ -80,6 +80,7 @@ void Screens::setCurrent(int current) return; } m_current = current; + emit currentChanged(); } void Screens::setCurrent(const QPoint &pos) diff --git a/screens.h b/screens.h index 0ba11d1aa9..13659e1a6a 100644 --- a/screens.h +++ b/screens.h @@ -39,7 +39,7 @@ class Screens : public QObject { Q_OBJECT Q_PROPERTY(int count READ count WRITE setCount NOTIFY countChanged) - Q_PROPERTY(int current READ current WRITE setCurrent) + Q_PROPERTY(int current READ current WRITE setCurrent NOTIFY currentChanged) Q_PROPERTY(bool currentFollowsMouse READ isCurrentFollowsMouse WRITE setCurrentFollowsMouse) public: @@ -79,6 +79,7 @@ Q_SIGNALS: * Emitted whenever the screens are changed either count or geometry. **/ void changed(); + void currentChanged(); protected Q_SLOTS: void setCount(int count);