[EffectWindow] Expose PID to effects
Differential Revision: https://phabricator.kde.org/D24222
This commit is contained in:
parent
0cacd9dc0a
commit
321e17ab68
4 changed files with 18 additions and 0 deletions
|
@ -254,6 +254,9 @@ public:
|
|||
bool isOutline() const override {
|
||||
return false;
|
||||
}
|
||||
pid_t pid() const override {
|
||||
return 0;
|
||||
}
|
||||
|
||||
private:
|
||||
qreal m_opacity = 1.0;
|
||||
|
|
|
@ -1840,6 +1840,7 @@ TOPLEVEL_HELPER(bool, skipsCloseAnimation, skipsCloseAnimation)
|
|||
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
|
||||
|
||||
|
|
|
@ -462,6 +462,8 @@ public:
|
|||
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;
|
||||
|
|
|
@ -2086,6 +2086,13 @@ class KWINEFFECTS_EXPORT EffectWindow : public QObject
|
|||
*/
|
||||
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 @@ public:
|
|||
*/
|
||||
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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue