fix(tray): fix visibility of Passive items
`show_all` call from `Tray::update` attempts to walk the widget tree and make every widget visible. Since we control individual tray item visibility based on `Status` SNI property, we don't want that to happen. Modify `Tray::update` to control the visibility of a whole tray module only and ensure that the children of `Item` are still visible when necessary.
This commit is contained in:
@ -35,11 +35,8 @@ void Tray::onRemove(std::unique_ptr<Item>& item) {
|
||||
}
|
||||
|
||||
auto Tray::update() -> void {
|
||||
if (box_.get_children().empty()) {
|
||||
box_.hide();
|
||||
} else {
|
||||
box_.show_all();
|
||||
}
|
||||
// Show tray only when items are availale
|
||||
box_.set_visible(!box_.get_children().empty());
|
||||
// Call parent update
|
||||
AModule::update();
|
||||
}
|
||||
|
Reference in New Issue
Block a user