diff --git a/autotests/test_window_paint_data.cpp b/autotests/test_window_paint_data.cpp --- a/autotests/test_window_paint_data.cpp +++ b/autotests/test_window_paint_data.cpp @@ -254,6 +254,9 @@ bool isOutline() const override { return false; } + pid_t pid() const override { + return 0; + } private: qreal m_opacity = 1.0; diff --git a/effects.h b/effects.h --- a/effects.h +++ b/effects.h @@ -462,6 +462,8 @@ bool isWaylandClient() const override; bool isX11Client() const override; + pid_t pid() const override; + QRect decorationInnerRect() const override; QByteArray readProperty(long atom, long type, int format) const override; void deleteProperty(long atom) const override; diff --git a/effects.cpp b/effects.cpp --- a/effects.cpp +++ b/effects.cpp @@ -1840,6 +1840,7 @@ TOPLEVEL_HELPER(KWayland::Server::SurfaceInterface *, surface, surface) TOPLEVEL_HELPER(bool, isPopupWindow, isPopupWindow) TOPLEVEL_HELPER(bool, isOutline, isOutline) +TOPLEVEL_HELPER(pid_t, pid, pid) #undef TOPLEVEL_HELPER diff --git a/libkwineffects/kwineffects.h b/libkwineffects/kwineffects.h --- a/libkwineffects/kwineffects.h +++ b/libkwineffects/kwineffects.h @@ -2086,6 +2086,13 @@ */ Q_PROPERTY(bool outline READ isOutline CONSTANT) + /** + * The PID of the application this window belongs to. + * + * @since 5.18 + */ + Q_PROPERTY(bool outline READ isOutline CONSTANT) + public: /** Flags explaining why painting should be disabled */ enum { @@ -2385,6 +2392,11 @@ */ virtual bool isOutline() const = 0; + /** + * @since 5.18 + */ + virtual pid_t pid() const = 0; + /** * Can be used to by effects to store arbitrary data in the EffectWindow. *