From 2dfbaabf31eeb8637380f2870db18017347bf8e6 Mon Sep 17 00:00:00 2001 From: peelz Date: Thu, 3 Jul 2025 15:13:37 -0400 Subject: [PATCH] fix(network): use atomic_bool to store the rfkill state --- include/util/rfkill.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/util/rfkill.hpp b/include/util/rfkill.hpp index f620db53..47ab729b 100644 --- a/include/util/rfkill.hpp +++ b/include/util/rfkill.hpp @@ -5,6 +5,8 @@ #include #include +#include + namespace waybar::util { class Rfkill : public sigc::trackable { @@ -17,7 +19,7 @@ class Rfkill : public sigc::trackable { private: enum rfkill_type rfkill_type_; - bool state_ = false; + std::atomic_bool state_ = false; int fd_ = -1; bool on_event(Glib::IOCondition cond);