Add captionChanged signal

Emitted during setCaption. The Q_PROPERTY has no setter as caption
is provided through WM_NAME.
This commit is contained in:
Martin Gräßlin 2011-12-22 14:53:11 +01:00
parent 08ad6c953f
commit 01633be601
2 changed files with 7 additions and 2 deletions

View file

@ -1869,6 +1869,7 @@ void Client::setCaption(const QString& _s, bool force)
client_group->updateItems(); client_group->updateItems();
decoration->captionChange(); decoration->captionChange();
} }
emit captionChanged();
} }
} }

View file

@ -76,8 +76,11 @@ class Client
* @see Workspace::activateClient * @see Workspace::activateClient
**/ **/
Q_PROPERTY(bool active READ isActive NOTIFY activeChanged) Q_PROPERTY(bool active READ isActive NOTIFY activeChanged)
// TODO: notify signal /**
Q_PROPERTY(QString caption READ caption) * The Caption of the Client. Read from WM_NAME property together with a suffix for hostname and shortcut.
* To read only the caption as provided by WM_NAME, use the getter with an additional @c false value.
**/
Q_PROPERTY(QString caption READ caption NOTIFY captionChanged)
// TODO: notify signal // TODO: notify signal
Q_PROPERTY(bool closeable READ isCloseable) Q_PROPERTY(bool closeable READ isCloseable)
// TODO: notify signal // TODO: notify signal
@ -523,6 +526,7 @@ signals:
void clientStepUserMovedResized(KWin::Client *, const QRect&); void clientStepUserMovedResized(KWin::Client *, const QRect&);
void clientFinishUserMovedResized(KWin::Client*); void clientFinishUserMovedResized(KWin::Client*);
void activeChanged(); void activeChanged();
void captionChanged();
private: private:
void exportMappingState(int s); // ICCCM 4.1.3.1, 4.1.4, NETWM 2.5.1 void exportMappingState(int s); // ICCCM 4.1.3.1, 4.1.4, NETWM 2.5.1