kwineffects: Expose internalId

This commit is contained in:
Vlad Zahorodnii 2021-11-22 17:58:04 +02:00 committed by Nate Graham
parent 6dffda920a
commit 2ac1f9b7d3
4 changed files with 14 additions and 0 deletions

View file

@ -336,6 +336,9 @@ public:
{
return 0;
}
QUuid internalId() const override {
return QUuid();
}
private:
qreal m_opacity = 1.0;

View file

@ -2055,6 +2055,7 @@ TOPLEVEL_HELPER(bool, isOutline, isOutline)
TOPLEVEL_HELPER(bool, isLockScreen, isLockScreen)
TOPLEVEL_HELPER(pid_t, pid, pid)
TOPLEVEL_HELPER(qlonglong, windowId, window)
TOPLEVEL_HELPER(QUuid, internalId, internalId)
#undef TOPLEVEL_HELPER

View file

@ -500,6 +500,7 @@ public:
pid_t pid() const override;
qlonglong windowId() const override;
QUuid internalId() const override;
QRect decorationInnerRect() const override;
KDecoration2::Decoration *decoration() const override;

View file

@ -2656,6 +2656,15 @@ public:
* @since 5.21
*/
virtual qlonglong windowId() const = 0;
/**
* Returns the internal id of the window that uniquely identifies it. The main difference
* between internalId() and windowId() is that the latter one works as expected only on X11,
* while the former is unique regardless of the window system.
*
* Note that the internaId() has special meaning only to kwin.
* @since 5.24
*/
virtual QUuid internalId() const = 0;
/**
* Can be used to by effects to store arbitrary data in the EffectWindow.