aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2015-02-05 08:50:31 -0600
committerTed Gould <ted@gould.cx>2015-02-05 08:50:31 -0600
commit85b5b397ae74fd08d66e89ee3ee132520ccb1d0d (patch)
tree8b5862a9a088fc275f262e78984bf290052da519 /src
parent47e8a6dbd878ed69aebc7a268b9d74e9dde014f6 (diff)
downloadayatana-indicator-sound-85b5b397ae74fd08d66e89ee3ee132520ccb1d0d.tar.gz
ayatana-indicator-sound-85b5b397ae74fd08d66e89ee3ee132520ccb1d0d.tar.bz2
ayatana-indicator-sound-85b5b397ae74fd08d66e89ee3ee132520ccb1d0d.zip
Making sure to record the output and volume for each invocation
Diffstat (limited to 'src')
-rw-r--r--src/service.vala12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/service.vala b/src/service.vala
index 22cb1c6..c942fc7 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -285,16 +285,18 @@ public class IndicatorSound.Service: Object {
if (!support_sync_notification)
return;
- /* Suppress notifications of volume changes if it is because the
- output stream changed. */
+ /* Update our volume and output */
var oldoutput = this.last_output_notification;
this.last_output_notification = this.volume_control.stream;
- if (oldoutput != this.last_output_notification)
- return;
- /* Supress updates that don't change the value */
var oldvolume = this.last_volume_notification;
this.last_volume_notification = volume_control.volume;
+
+ /* Suppress notifications of volume changes if it is because the
+ output stream changed. */
+ if (oldoutput != this.last_output_notification)
+ return;
+ /* Supress updates that don't change the value */
if (oldvolume == this.last_volume_notification)
return;