fix(network): use atomic_bool to store the rfkill state
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user