diff --git a/src/protocols/IdleNotify.cpp b/src/protocols/IdleNotify.cpp index ae3de002..fed9bdab 100644 --- a/src/protocols/IdleNotify.cpp +++ b/src/protocols/IdleNotify.cpp @@ -55,6 +55,10 @@ void CExtIdleNotification::onActivity() { updateTimer(); } +bool CExtIdleNotification::inhibitorsAreObeyed() const { + return obeyInhibitors; +} + CIdleNotifyProtocol::CIdleNotifyProtocol(const wl_interface* iface, const int& ver, const std::string& name) : IWaylandProtocol(iface, ver, name) { ; } @@ -99,7 +103,7 @@ void CIdleNotifyProtocol::onActivity() { void CIdleNotifyProtocol::setInhibit(bool inhibited) { isInhibited = inhibited; for (auto const& n : m_vNotifications) { - if (n->obeyInhibitors) + if (n->inhibitorsAreObeyed()) n->onActivity(); } } \ No newline at end of file diff --git a/src/protocols/IdleNotify.hpp b/src/protocols/IdleNotify.hpp index 2fef7a16..8865d6bf 100644 --- a/src/protocols/IdleNotify.hpp +++ b/src/protocols/IdleNotify.hpp @@ -17,6 +17,8 @@ class CExtIdleNotification { void onTimerFired(); void onActivity(); + bool inhibitorsAreObeyed() const; + private: SP resource; uint32_t timeoutMs = 0;