fix(network): use atomic_bool to store the rfkill state

This commit is contained in:
peelz
2025-07-03 15:13:37 -04:00
parent f991af2893
commit 2dfbaabf31

View File

@ -5,6 +5,8 @@
#include <sigc++/signal.h>
#include <sigc++/trackable.h>
#include <atomic>
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);