aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/service.vala7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/service.vala b/src/service.vala
index ba77ae8..da6b824 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -271,6 +271,7 @@ public class IndicatorSound.Service: Object {
private bool check_sync_notification = false;
private bool support_sync_notification = false;
private string last_output_notification = "multimedia";
+ private string last_volume_notification = 0;
void update_sync_notification () {
if (!check_sync_notification) {
@@ -291,6 +292,12 @@ public class IndicatorSound.Service: Object {
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;
+ if (oldvolume == this.last_volume_notification)
+ return;
+
var shown_action = actions.lookup_action ("indicator-shown") as SimpleAction;
if (shown_action != null && shown_action.get_state().get_boolean())
return;