From 564853110a6e1367cc379bd8418d874829302d00 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 11 Sep 2025 23:17:57 +0200 Subject: ... --- accounts/gkleen@sif/shell/quickshell-plugins/Systemd.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'accounts/gkleen@sif/shell/quickshell-plugins/Systemd.cpp') diff --git a/accounts/gkleen@sif/shell/quickshell-plugins/Systemd.cpp b/accounts/gkleen@sif/shell/quickshell-plugins/Systemd.cpp index 790f514f..884ea17f 100644 --- a/accounts/gkleen@sif/shell/quickshell-plugins/Systemd.cpp +++ b/accounts/gkleen@sif/shell/quickshell-plugins/Systemd.cpp @@ -118,6 +118,8 @@ std::string SystemdInhibitorParams::toString(SystemdInhibitorParams::Mode mode) bool SystemdInhibitor::enabled() const { return static_cast(this->activeInhibitor); } void SystemdInhibitor::setEnabled(bool enabled) { + this->mEnabled = enabled; + if (enabled) this->update(); else @@ -173,7 +175,7 @@ void SystemdInhibitor::release() { } void SystemdInhibitor::update() { - if (!this->mWhat || this->mWho.isEmpty() || this->mWhy.isEmpty() || !this->mMode) + if (!this->mWhat || this->mWho.isEmpty() || this->mWhy.isEmpty() || !this->mMode || !this->mEnabled) if (this->activeInhibitor) this->release(); else -- cgit v1.2.3