From 070619fa3416d07c1cfd6cfc5077ec016679bb3e Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 26 May 2019 20:09:05 +0200 Subject: [PATCH] revert: restore idle fix --- src/bar.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/bar.cpp b/src/bar.cpp index 8306f75..e6cb84a 100644 --- a/src/bar.cpp +++ b/src/bar.cpp @@ -286,11 +286,14 @@ void waybar::Bar::getModules(const Factory& factory, const std::string& pos) { modules_right_.emplace_back(module); } module->dp.connect([module, &name] { - try { - module->update(); - } catch (const std::exception& e) { - spdlog::error("{}: {}", name.asString(), e.what()); - } + // Fix https://github.com/Alexays/Waybar/issues/320, proper way? + Glib::signal_idle().connect_once([module, &name] { + try { + module->update(); + } catch (const std::exception& e) { + spdlog::error("{}: {}", name.asString(), e.what()); + } + }); }); } catch (const std::exception& e) { spdlog::warn("module {}: {}", name.asString(), e.what());