aboutsummaryrefslogtreecommitdiff
path: root/src/service.vala
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2015-02-05 08:52:58 -0600
committerTed Gould <ted@gould.cx>2015-02-05 08:52:58 -0600
commitc6002f571882de3b7bf3d3a6a2045272d818b4db (patch)
treec4bf747687988a9a24cd0cf069a997b7adfc9913 /src/service.vala
parent85b5b397ae74fd08d66e89ee3ee132520ccb1d0d (diff)
downloadayatana-indicator-sound-c6002f571882de3b7bf3d3a6a2045272d818b4db.tar.gz
ayatana-indicator-sound-c6002f571882de3b7bf3d3a6a2045272d818b4db.tar.bz2
ayatana-indicator-sound-c6002f571882de3b7bf3d3a6a2045272d818b4db.zip
Compare doubles with an accuracy range
Diffstat (limited to 'src/service.vala')
-rw-r--r--src/service.vala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/service.vala b/src/service.vala
index c942fc7..b07f267 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -297,7 +297,7 @@ public class IndicatorSound.Service: Object {
if (oldoutput != this.last_output_notification)
return;
/* Supress updates that don't change the value */
- if (oldvolume == this.last_volume_notification)
+ if (GLib.Math.fabs(oldvolume - this.last_volume_notification) < 0.01)
return;
var shown_action = actions.lookup_action ("indicator-shown") as SimpleAction;