From 5319cb6e106080c4aa5ddedf41913b2104f60b45 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 17 Oct 2023 20:12:24 +0200 Subject: [PATCH] fix: upower hidded on start --- src/modules/upower/upower.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/upower/upower.cpp b/src/modules/upower/upower.cpp index 1262d0a1..f2bc621d 100644 --- a/src/modules/upower/upower.cpp +++ b/src/modules/upower/upower.cpp @@ -289,7 +289,12 @@ auto UPower::update() -> void { std::lock_guard guard(m_Mutex); // Don't update widget if the UPower service isn't running - if (!upowerRunning) return; + if (!upowerRunning) { + if (hideIfEmpty) { + event_box_.set_visible(false); + } + return; + } UpDeviceKind kind; UpDeviceState state;