diff --git a/autotests/test_window_paint_data.cpp b/autotests/test_window_paint_data.cpp index c9db8e485a..57db08ea14 100644 --- a/autotests/test_window_paint_data.cpp +++ b/autotests/test_window_paint_data.cpp @@ -336,6 +336,9 @@ public: { return 0; } + QUuid internalId() const override { + return QUuid(); + } private: qreal m_opacity = 1.0; diff --git a/src/effects.cpp b/src/effects.cpp index 653a7cb9b8..4ef1e624d7 100644 --- a/src/effects.cpp +++ b/src/effects.cpp @@ -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 diff --git a/src/effects.h b/src/effects.h index 783043c551..be89c5a8e7 100644 --- a/src/effects.h +++ b/src/effects.h @@ -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; diff --git a/src/libkwineffects/kwineffects.h b/src/libkwineffects/kwineffects.h index bb8303766a..51b2702ec2 100644 --- a/src/libkwineffects/kwineffects.h +++ b/src/libkwineffects/kwineffects.h @@ -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.