aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-10-13 21:32:30 -0500
committerTed Gould <ted@gould.cx>2014-10-13 21:32:30 -0500
commit9e39fba127c95aee79b26d2b88cb80dc279a5011 (patch)
tree0c55e8ed5ef6a435636b2e14cfb01a3492fce793 /src
parent7ec3795022cbfff0e1c0c094309a4b67d1dd3b04 (diff)
downloadayatana-indicator-sound-9e39fba127c95aee79b26d2b88cb80dc279a5011.tar.gz
ayatana-indicator-sound-9e39fba127c95aee79b26d2b88cb80dc279a5011.tar.bz2
ayatana-indicator-sound-9e39fba127c95aee79b26d2b88cb80dc279a5011.zip
Ensure we reevaluate the high volume warning when we switch from headphones or not
Diffstat (limited to 'src')
-rw-r--r--src/volume-control.vala4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala
index b32146f..ea8e3ac 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -163,6 +163,8 @@ public class VolumeControl : Object
private void sink_info_cb_for_props (Context c, SinkInfo? i, int eol)
{
+ bool old_active_port_headphone = this._active_port_headphone;
+
if (i == null)
return;
@@ -197,6 +199,8 @@ public class VolumeControl : Object
{
_volume = volume_to_double (i.volume.max ());
volume_changed (_volume);
+ } else if (this._active_port_headphone != old_active_port_headphone) {
+ volume_changed (_volume);
}
}