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);