diff --git a/plugins/systemvolume/systemvolumeplugin-pulse.cpp b/plugins/systemvolume/systemvolumeplugin-pulse.cpp index 93942300e..7a56ff4e3 100644 --- a/plugins/systemvolume/systemvolumeplugin-pulse.cpp +++ b/plugins/systemvolume/systemvolumeplugin-pulse.cpp @@ -80,12 +80,20 @@ void SystemvolumePlugin::sendSinkList() { sendPacket(np); }); + connect(sink, &PulseAudioQt::Sink::defaultChanged, this, [this, sink] { + NetworkPacket np(PACKET_TYPE_SYSTEMVOLUME); + np.set(QStringLiteral("enabled"), sink->isDefault()); + np.set(QStringLiteral("name"), sink->name()); + sendPacket(np); + }); + QJsonObject sinkObject { {QStringLiteral("name"), sink->name()}, {QStringLiteral("muted"), sink->isMuted()}, {QStringLiteral("description"), sink->description()}, {QStringLiteral("volume"), sink->volume()}, - {QStringLiteral("maxVolume"), PulseAudioQt::normalVolume()} + {QStringLiteral("maxVolume"), PulseAudioQt::normalVolume()}, + {QStringLiteral("enabled"), sink->isDefault()} }; array.append(sinkObject);