fix(tray): sigsev on click when multiple icons is available

This commit is contained in:
Alexis
2018-11-16 12:01:03 +01:00
parent 33f138c16e
commit 69fceb1c92
3 changed files with 38 additions and 45 deletions

View File

@ -13,9 +13,9 @@ waybar::modules::SNI::Tray::Tray(const Json::Value &config)
auto waybar::modules::SNI::Tray::update() -> void {
auto childrens = box_.get_children();
childrens.erase(childrens.begin(), childrens.end());
// childrens.erase(childrens.begin(), childrens.end());
for (auto &item : host_.items) {
box_.pack_start(item.event_box);
box_.pack_start(*item.event_box);
}
if (box_.get_children().size() > 0) {
box_.set_name("tray");