diff options
| author | J. J. Ramsey <jjramsey@users.noreply.github.com> | 2025-02-11 09:58:43 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-11 15:58:43 +0100 |
| commit | f83fe9986b34c53c67b113a015d54fe8c084e9bd (patch) | |
| tree | 77c9a5e76b5666138b98c487a275390da0489884 /src/protocols/IdleNotify.hpp | |
| parent | f2d43e5f2180adb81b3b7b51a7d0f39dace70b05 (diff) | |
protocols: add version 2 of ext-idle-notify-v1 protocol (#8959)
Signed-off-by: James Ramsey <james.jehiel.ramsey@gmail.com>
Co-authored-by: James Ramsey <james.jehiel.ramsey@gmail.com>
Diffstat (limited to 'src/protocols/IdleNotify.hpp')
| -rw-r--r-- | src/protocols/IdleNotify.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/protocols/IdleNotify.hpp b/src/protocols/IdleNotify.hpp index e3dcdc98..efc3accc 100644 --- a/src/protocols/IdleNotify.hpp +++ b/src/protocols/IdleNotify.hpp @@ -9,19 +9,22 @@ class CEventLoopTimer; class CExtIdleNotification { public: - CExtIdleNotification(SP<CExtIdleNotificationV1> resource_, uint32_t timeoutMs); + CExtIdleNotification(SP<CExtIdleNotificationV1> resource_, uint32_t timeoutMs, bool obeyInhibitors); ~CExtIdleNotification(); bool good(); void onTimerFired(); void onActivity(); + bool inhibitorsAreObeyed() const; + private: SP<CExtIdleNotificationV1> resource; uint32_t timeoutMs = 0; SP<CEventLoopTimer> timer; - bool idled = false; + bool idled = false; + bool obeyInhibitors = false; void updateTimer(); }; @@ -38,7 +41,7 @@ class CIdleNotifyProtocol : public IWaylandProtocol { private: void onManagerResourceDestroy(wl_resource* res); void destroyNotification(CExtIdleNotification* notif); - void onGetNotification(CExtIdleNotifierV1* pMgr, uint32_t id, uint32_t timeout, wl_resource* seat); + void onGetNotification(CExtIdleNotifierV1* pMgr, uint32_t id, uint32_t timeout, wl_resource* seat, bool obeyInhibitors); bool isInhibited = false; |
