mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
refactor: destroy threads first
This commit is contained in:
@ -5,8 +5,8 @@
|
||||
#include "bar.hpp"
|
||||
#include "client.hpp"
|
||||
#include "modules/sway/ipc/client.hpp"
|
||||
#include "util/sleeper_thread.hpp"
|
||||
#include "util/json.hpp"
|
||||
#include "util/sleeper_thread.hpp"
|
||||
|
||||
namespace waybar::modules::sway {
|
||||
|
||||
@ -20,10 +20,11 @@ class Mode : public ALabel, public sigc::trackable {
|
||||
void onEvent(const struct Ipc::ipc_response&);
|
||||
void worker();
|
||||
|
||||
waybar::util::SleeperThread thread_;
|
||||
Ipc ipc_;
|
||||
std::string mode_;
|
||||
std::string mode_;
|
||||
util::JsonParser parser_;
|
||||
|
||||
util::SleeperThread thread_;
|
||||
Ipc ipc_;
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::sway
|
||||
|
@ -24,14 +24,15 @@ class Window : public ALabel, public sigc::trackable {
|
||||
std::tuple<std::size_t, int, std::string, std::string> getFocusedNode(const Json::Value& nodes);
|
||||
void getTree();
|
||||
|
||||
const Bar& bar_;
|
||||
waybar::util::SleeperThread thread_;
|
||||
Ipc ipc_;
|
||||
std::mutex mutex_;
|
||||
std::string window_;
|
||||
int windowId_;
|
||||
std::string app_id_;
|
||||
util::JsonParser parser_;
|
||||
const Bar& bar_;
|
||||
std::mutex mutex_;
|
||||
std::string window_;
|
||||
int windowId_;
|
||||
std::string app_id_;
|
||||
util::JsonParser parser_;
|
||||
|
||||
util::SleeperThread thread_;
|
||||
Ipc ipc_;
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::sway
|
||||
|
@ -36,13 +36,14 @@ class Workspaces : public IModule, public sigc::trackable {
|
||||
const Json::Value& config_;
|
||||
std::vector<Json::Value> workspaces_;
|
||||
std::vector<std::string> workspaces_order_;
|
||||
waybar::util::SleeperThread thread_;
|
||||
Ipc ipc_;
|
||||
std::mutex mutex_;
|
||||
Gtk::Box box_;
|
||||
util::JsonParser parser_;
|
||||
bool scrolling_;
|
||||
std::unordered_map<std::string, Gtk::Button> buttons_;
|
||||
|
||||
util::SleeperThread thread_;
|
||||
Ipc ipc_;
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::sway
|
||||
|
Reference in New Issue
Block a user