[libkwineffects] Add windowId to EffectWindow

My use case is integrating with a system that tracks window properties based on the windowId. This allows the effect to do window-specific things.
This commit is contained in:
Nicolas Fella 2020-11-01 15:25:15 +01:00 committed by Nicolas Fella
parent 3281569c12
commit fe6c296073
4 changed files with 10 additions and 0 deletions

View file

@ -253,6 +253,9 @@ public:
pid_t pid() const override {
return 0;
}
qlonglong windowId() const override {
return 0;
}
private:
qreal m_opacity = 1.0;

View file

@ -1828,6 +1828,7 @@ TOPLEVEL_HELPER(KWaylandServer::SurfaceInterface *, surface, surface)
TOPLEVEL_HELPER(bool, isPopupWindow, isPopupWindow)
TOPLEVEL_HELPER(bool, isOutline, isOutline)
TOPLEVEL_HELPER(pid_t, pid, pid)
TOPLEVEL_HELPER(qlonglong, windowId, window)
#undef TOPLEVEL_HELPER

View file

@ -454,6 +454,7 @@ public:
bool isX11Client() const override;
pid_t pid() const override;
qlonglong windowId() const override;
QRect decorationInnerRect() const override;
QByteArray readProperty(long atom, long type, int format) const override;

View file

@ -2438,6 +2438,11 @@ public:
*/
virtual pid_t pid() const = 0;
/**
* @since 5.21
*/
virtual qlonglong windowId() const = 0;
/**
* Can be used to by effects to store arbitrary data in the EffectWindow.
*