summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Bouchaud <michael.bouchaud@ext.actia.fr>2017-02-23 00:51:33 +0100
committerMichael Bouchaud <michael.bouchaud@ext.actia.fr>2017-02-23 00:51:33 +0100
commit2e043e825d1c22de3be0beddd5db43753fde984e (patch)
tree772b81e1e65e31d3cfe0c1598867f52d42d6455b
parentcb6ea9f747be869612fe7915f5380d9300cc5d83 (diff)
e_client_volume: Don't set client volume to max after a mute.
Don't set client volume to max after a mute and unmute. Just check if the volume is within the available limits.
-rw-r--r--src/bin/e_client_volume.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/bin/e_client_volume.c b/src/bin/e_client_volume.c
index 187da949d..196364863 100644
--- a/src/bin/e_client_volume.c
+++ b/src/bin/e_client_volume.c
@@ -264,8 +264,15 @@ _e_client_volume_update(E_Client *ec)
264 { 264 {
265 ec->volume_min = volume_min; 265 ec->volume_min = volume_min;
266 ec->volume_max = volume_max; 266 ec->volume_max = volume_max;
267 if (count > 0) ec->volume = volume / count; 267 if (count == 0)
268 else ec->volume = volume_max; 268 {
269 if (ec->volume < volume_min)
270 ec->volume = volume_min;
271 if (ec->volume > volume_max)
272 ec->volume = volume_max;
273 }
274 else
275 ec->volume = volume / count;
269 ec->mute = mute; 276 ec->mute = mute;
270 ec->volume_control_enabled = EINA_TRUE; 277 ec->volume_control_enabled = EINA_TRUE;
271 } 278 }