fix(Window): avoid concurrency

This commit is contained in:
Alex
2019-05-13 14:35:45 +02:00
parent b54160e02f
commit 0c3c548bc0
3 changed files with 5 additions and 3 deletions

View File

@ -25,6 +25,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 [nb, id, name, app_id] = getFocusedNode(payload);
if (!app_id_.empty()) {