mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix(gtk): use idle to avoid mutex
This commit is contained in:
@ -5,7 +5,9 @@ waybar::modules::Clock::Clock(Json::Value config)
|
||||
{
|
||||
_label.get_style_context()->add_class("clock");
|
||||
_thread = [this] {
|
||||
update();
|
||||
Glib::signal_idle().connect_once([this] {
|
||||
update();
|
||||
});
|
||||
auto now = waybar::chrono::clock::now();
|
||||
auto timeout =
|
||||
std::chrono::floor<std::chrono::minutes>(now + std::chrono::minutes(1));
|
||||
|
Reference in New Issue
Block a user