After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 637569 - volume underflows and wraps around to maxuint
volume underflows and wraps around to maxuint
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: media-keys
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2010-12-19 13:57 UTC by Sjoerd Simons
Modified: 2011-01-18 01:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (2.10 KB, patch)
2010-12-19 13:57 UTC, Sjoerd Simons
none Details | Review
media-keys: Fix volume underflow (1.48 KB, patch)
2011-01-17 15:29 UTC, Bastien Nocera
none Details | Review
media-keys: Fix volume underflow (1.36 KB, patch)
2011-01-17 15:30 UTC, Bastien Nocera
none Details | Review

Description Sjoerd Simons 2010-12-19 13:57:50 UTC
Created attachment 176703 [details] [review]
proposed patch

when the volume is muted the current logic always substract one step from the volume... which isn't the best if the volume is already 0.. patch to fix this attached
Comment 1 Bastien Nocera 2011-01-17 15:29:24 UTC
Created attachment 178519 [details] [review]
media-keys: Fix volume underflow

When reducing the volume and the volume is already low, avoid
underflowing it. Spotted by Sjoerd Simons
<sjoerd.simons@collabora.co.uk>
Comment 2 Bastien Nocera 2011-01-17 15:29:53 UTC
I believe this patch fixes the problem just as well, please test.
Comment 3 Bastien Nocera 2011-01-17 15:30:43 UTC
Created attachment 178521 [details] [review]
media-keys: Fix volume underflow

When reducing the volume and the volume is already low, avoid
underflowing it. Spotted by Sjoerd Simons
<sjoerd.simons@collabora.co.uk>
Comment 4 Emilio Pozuelo Monfort 2011-01-17 23:13:34 UTC
I can reproduce the bug with 2.91.8, and I can't with any of the two patches.
Comment 5 Bastien Nocera 2011-01-18 01:35:26 UTC
Sjoerd, feel free to submit your simplifications as a separate patch.

commit a0410ebb15109ee44ca103079d1da7225ec88214
Author: Bastien Nocera <hadess@hadess.net>
Date:   Mon Jan 17 15:28:33 2011 +0000

    media-keys: Fix volume underflow
    
    When reducing the volume and the volume is already low, avoid
    underflowing it. Spotted by Sjoerd Simons
    <sjoerd.simons@collabora.co.uk>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=637569