Fix attempt to read private variable obeyInhibitors

This commit is contained in:
James Ramsey 2025-01-04 16:26:55 -05:00
parent e34ced7f09
commit 08911712c3
2 changed files with 7 additions and 1 deletions

View file

@ -55,6 +55,10 @@ void CExtIdleNotification::onActivity() {
updateTimer(); updateTimer();
} }
bool CExtIdleNotification::inhibitorsAreObeyed() const {
return obeyInhibitors;
}
CIdleNotifyProtocol::CIdleNotifyProtocol(const wl_interface* iface, const int& ver, const std::string& name) : IWaylandProtocol(iface, ver, name) { 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) { void CIdleNotifyProtocol::setInhibit(bool inhibited) {
isInhibited = inhibited; isInhibited = inhibited;
for (auto const& n : m_vNotifications) { for (auto const& n : m_vNotifications) {
if (n->obeyInhibitors) if (n->inhibitorsAreObeyed())
n->onActivity(); n->onActivity();
} }
} }

View file

@ -17,6 +17,8 @@ class CExtIdleNotification {
void onTimerFired(); void onTimerFired();
void onActivity(); void onActivity();
bool inhibitorsAreObeyed() const;
private: private:
SP<CExtIdleNotificationV1> resource; SP<CExtIdleNotificationV1> resource;
uint32_t timeoutMs = 0; uint32_t timeoutMs = 0;