[kwin] Introduce a currentChanged signal in screens

This commit is contained in:
Martin Gräßlin 2013-12-11 11:13:47 +01:00
parent 54bc491c46
commit 5f7eab206d
2 changed files with 3 additions and 1 deletions

View file

@ -80,6 +80,7 @@ void Screens::setCurrent(int current)
return; return;
} }
m_current = current; m_current = current;
emit currentChanged();
} }
void Screens::setCurrent(const QPoint &pos) void Screens::setCurrent(const QPoint &pos)

View file

@ -39,7 +39,7 @@ class Screens : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(int count READ count WRITE setCount NOTIFY countChanged) 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) Q_PROPERTY(bool currentFollowsMouse READ isCurrentFollowsMouse WRITE setCurrentFollowsMouse)
public: public:
@ -79,6 +79,7 @@ Q_SIGNALS:
* Emitted whenever the screens are changed either count or geometry. * Emitted whenever the screens are changed either count or geometry.
**/ **/
void changed(); void changed();
void currentChanged();
protected Q_SLOTS: protected Q_SLOTS:
void setCount(int count); void setCount(int count);