mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix(gtk): use idle to avoid mutex
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
#include <json/json.h>
|
||||
#include <gtkmm.h>
|
||||
#include <fmt/format.h>
|
||||
#include <thread>
|
||||
#include "util/chrono.hpp"
|
||||
#include "IModule.hpp"
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include <gtkmm.h>
|
||||
#include <fmt/format.h>
|
||||
#include <sys/sysinfo.h>
|
||||
#include <thread>
|
||||
#include "util/chrono.hpp"
|
||||
#include "IModule.hpp"
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include <json/json.h>
|
||||
#include <gtkmm.h>
|
||||
#include <fmt/format.h>
|
||||
#include <thread>
|
||||
#include "util/chrono.hpp"
|
||||
#include "IModule.hpp"
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include <gtkmm.h>
|
||||
#include <fmt/format.h>
|
||||
#include <sys/sysinfo.h>
|
||||
#include <thread>
|
||||
#include "util/chrono.hpp"
|
||||
#include "IModule.hpp"
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include <json/json.h>
|
||||
#include <gtkmm.h>
|
||||
#include <fmt/format.h>
|
||||
#include <thread>
|
||||
#include "util/chrono.hpp"
|
||||
#include "IModule.hpp"
|
||||
|
||||
|
@ -14,20 +14,14 @@ namespace waybar::modules {
|
||||
auto update() -> void;
|
||||
operator Gtk::Widget &();
|
||||
private:
|
||||
void _updateThread();
|
||||
static void _handle_idle(void *data,
|
||||
struct org_kde_kwin_idle_timeout *timer);
|
||||
static void _handle_resume(void *data,
|
||||
struct org_kde_kwin_idle_timeout *timer);
|
||||
void _addWorkspace(Json::Value node);
|
||||
Json::Value _getWorkspaces();
|
||||
Bar &_bar;
|
||||
util::SleeperThread *_thread;
|
||||
Gtk::Box *_box;
|
||||
waybar::util::SleeperThread _thread;
|
||||
Gtk::Box _box;
|
||||
std::unordered_map<int, Gtk::Button> _buttons;
|
||||
int _ipcSocketfd;
|
||||
int _ipcEventSocketfd;
|
||||
struct org_kde_kwin_idle_timeout *_idle_timer;
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user