Add Window.captionNormal property

Make the window caption without suffix available in
the scripting API by adding a `captionNormal` property.

Update the doc for the `caption` property to mention that
`captionNormal` can be used to get the caption without
added suffix, instead of suggesting to call a getter with
a bool param that was dropped in

    commit f0652970f4
    Date:   Sun Aug 20 09:35:15 2017 +0200

        Drop boolean parameter from AbstractClient::caption
This commit is contained in:
Michael Weghorn 2024-07-29 09:16:46 +02:00 committed by Vlad Zahorodnii
parent f015b73a48
commit 14a10b3b4b

View file

@ -386,10 +386,15 @@ class KWIN_EXPORT Window : public QObject
/**
* The Caption of the Window. 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.
* To read only the caption as provided by WM_NAME, use @c captionNormal.
*/
Q_PROPERTY(QString caption READ caption NOTIFY captionChanged)
/**
* The Caption of the Window. Read from WM_NAME property.
*/
Q_PROPERTY(QString captionNormal READ captionNormal NOTIFY captionNormalChanged)
/**
* Minimum size as specified in WM_NORMAL_HINTS
*/