fix: add proper mutex

This commit is contained in:
Alex
2019-06-17 11:39:45 +02:00
parent 71a9a75aad
commit ff9d598c16
6 changed files with 12 additions and 5 deletions

View File

@ -21,6 +21,7 @@ void Window::onEvent(const struct Ipc::ipc_response& res) { getTree(); }
void Window::onCmd(const struct Ipc::ipc_response& res) {
try {
std::lock_guard<std::mutex> lock(mutex_);
auto payload = parser_.parse(res.payload);
auto output = payload["ouput"].isString() ? payload["output"].asString() : "";
std::tie(app_nb_, windowId_, window_, app_id_) = getFocusedNode(payload["nodes"], output);