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 692192 - Wrong timeout for idle-dim
Wrong timeout for idle-dim
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: power
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Richard Hughes
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2013-01-21 12:05 UTC by Giovanni Campagna
Modified: 2013-01-21 15:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Giovanni Campagna 2013-01-21 12:05:56 UTC
I was looking at commits-list, and noticed 7bc750a5861fb72c1f24664b17f0cb0799077dc1.

You changed
timeout_dim /= IDLE_DELAY_TO_IDLE_DIM_FRACTION
(timeout_dim /= 3)
to
timeout_dim *= IDLE_DELAY_TO_IDLE_DIM_MULTIPLIER
(timeout_dim *= 4/5);

but that resolves to
timeout_dim = timeout_dim * (4/5) = timeout_dim * (0) = 0;

You need .0 to force double conversion, or to write
timeout_dim = timeout_dim * 4 / 5
to get the multiplication first
Comment 1 Bastien Nocera 2013-01-21 15:55:36 UTC
Thanks for spotting this!