volume: suppress OSD when adjusting volume while muted

parent c2222d21
...@@ -108,9 +108,15 @@ namespace XimperShellOsd { ...@@ -108,9 +108,15 @@ namespace XimperShellOsd {
return; return;
} }
if (volume != last_volume || is_muted != last_muted) { bool mute_changed = is_muted != last_muted;
last_volume = volume; bool volume_really_changed = volume != last_volume;
last_muted = is_muted;
last_volume = volume;
last_muted = is_muted;
if (mute_changed) {
volume_changed (volume, is_muted);
} else if (volume_really_changed && !is_muted) {
volume_changed (volume, is_muted); volume_changed (volume, is_muted);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment