mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix(Workspaces): fix concurrence and move json parser to ipc client
This commit is contained in:
@ -16,9 +16,8 @@ Mode::Mode(const std::string& id, const Bar& bar, const Json::Value& config)
|
||||
}
|
||||
|
||||
void Mode::onEvent(const struct Ipc::ipc_response res) {
|
||||
auto parsed = parser_.parse(res.payload);
|
||||
if (parsed["change"] != "default") {
|
||||
mode_ = parsed["change"].asString();
|
||||
if (res.payload["change"] != "default") {
|
||||
mode_ = res.payload["change"].asString();
|
||||
} else {
|
||||
mode_.clear();
|
||||
}
|
||||
|
Reference in New Issue
Block a user