aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-08-11 10:01:36 -0500
committerCharles Kerr <charles.kerr@canonical.com>2015-08-11 10:01:36 -0500
commit37f663ff9c5b6c77ec0d128d70d7ab213d865477 (patch)
tree380278d809c852e0dad0fd7bd8195b3819d0ee41 /src
parent4570ce15a7769a4a1ce3b5ce4ac5d578c77eb267 (diff)
downloadayatana-indicator-sound-37f663ff9c5b6c77ec0d128d70d7ab213d865477.tar.gz
ayatana-indicator-sound-37f663ff9c5b6c77ec0d128d70d7ab213d865477.tar.bz2
ayatana-indicator-sound-37f663ff9c5b6c77ec0d128d70d7ab213d865477.zip
ensure the high volume timer is always at least 1 sec
Diffstat (limited to 'src')
-rw-r--r--src/volume-control-pulse.vala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/volume-control-pulse.vala b/src/volume-control-pulse.vala
index a2605c6..7f0edcb 100644
--- a/src/volume-control-pulse.vala
+++ b/src/volume-control-pulse.vala
@@ -749,7 +749,7 @@ public class VolumeControlPulse : VolumeControl
int64 expires_at = _high_volume_approved_at + _high_volume_approved_ttl_usec;
int64 now = GLib.get_monotonic_time();
if (expires_at > now) {
- var seconds_left = (now - expires_at) / 1000000;
+ var seconds_left = 1 + ((now - expires_at) / 1000000);
_high_volume_approved_timer = Timeout.add_seconds((uint)seconds_left, on_high_volume_timer);
}
}