From c6002f571882de3b7bf3d3a6a2045272d818b4db Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 5 Feb 2015 08:52:58 -0600 Subject: Compare doubles with an accuracy range --- src/service.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3