Merge pull request #1590 from qubidt/pulseaudio-fix

pulseaudio: avoid retaining outdated form factor
This commit is contained in:
Alex 2022-06-15 09:15:50 +02:00 committed by GitHub
commit d10d9b8202
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -190,6 +190,8 @@ void waybar::modules::Pulseaudio::sinkInfoCb(pa_context * /*context*/, const pa_
pa->port_name_ = i->active_port != nullptr ? i->active_port->name : "Unknown"; pa->port_name_ = i->active_port != nullptr ? i->active_port->name : "Unknown";
if (auto ff = pa_proplist_gets(i->proplist, PA_PROP_DEVICE_FORM_FACTOR)) { if (auto ff = pa_proplist_gets(i->proplist, PA_PROP_DEVICE_FORM_FACTOR)) {
pa->form_factor_ = ff; pa->form_factor_ = ff;
} else {
pa->form_factor_ = "";
} }
pa->dp.emit(); pa->dp.emit();
} }