Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/panel/widgets/tray/host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ void StatusNotifierHost::on_bus_acquired(const Glib::RefPtr<Gio::DBus::Connectio
});
Glib::Variant<std::vector<Glib::ustring>> registred_items_var;
watcher_proxy->get_cached_property(registred_items_var, "RegisteredStatusNotifierItems");
for (const auto & service : registred_items_var.get())
if (registred_items_var)
{
tray->add_item(service);
for (const auto & service : registred_items_var.get())
{
tray->add_item(service);
}
}
});
},
Expand Down
20 changes: 9 additions & 11 deletions src/panel/widgets/wp-mixer/wp-common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,24 +209,22 @@ void WpCommon::on_mixer_changed(gpointer mixer_api, guint id, gpointer data)
// for each widget
for (auto widget : instance->widgets)
{
WfWpControl *control;
WfWpControl *control = nullptr;

// first, find the appropiate control
// first, find the appropriate control
for (auto & it : widget->objects_to_controls)
{
WpPipewireObject *obj = it.first;
control = it.second.get();
if (wp_proxy_get_bound_id(WP_PROXY(obj)) == id)
if (wp_proxy_get_bound_id(WP_PROXY(it.first)) == id)
{
control = it.second.get();
break;
}
}

// if we are at the end and still no match
if (it.first == widget->objects_to_controls.end()->first)
{
std::cerr << "Wireplumber mixer could not find control for wp object";
return;
}
if (!control)
{
std::cerr << "Wireplumber mixer could not find control for wp object\n";
continue;
}

const auto update_icons = [&] ()
Expand Down
Loading