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 659204 - power: excessive signal emissions
power: excessive signal emissions
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: 2011-09-16 02:15 UTC by Matthias Clasen
Modified: 2011-09-16 08:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Clasen 2011-09-16 02:15:35 UTC
reading the code, I notice that engine_recalculate_state emits at least 3 Changed signals, some of them in the middle of recalculating. Should just emit it once, when all the state is updated.
Comment 1 Richard Hughes 2011-09-16 08:25:40 UTC
Good catch, thanks:

commit 3da731eb4ed3f59191504b135128a5dc939795ff
Author: Richard Hughes <richard@hughsie.com>
Date:   Fri Sep 16 09:24:14 2011 +0100

    power: Do not emit multiple 'Changed' signals when recalculating
    
    We were issuing up to three changed signals, and always doing at least one when
    nothing had actually changed.
    Ensure we only send one signal, and only send that if something was different
    from before.
    
    Resolves https://bugzilla.gnome.org/show_bug.cgi?id=659204