GNOME Bugzilla – Bug 767037
GsdPowerManager: keep internal keyboard backlight in sync with UPower
Last modified: 2017-05-24 15:26:30 UTC
Keyboard backlight could be changed by other components too, and if this happens a signal is emitted, thus we should update the cached value accordingly. In theory at this point we could even delete the manual update of kbd_brightness_now (as per https://paste.gnome.org/pzwyqpkq4), as this is implicit, but we can still keep this around. Let me know what you prefer.
Created attachment 328759 [details] [review] GsdPowerManager: keep internal keyboard backlight in sync with UPower Keyboard backlight could be changed by other components too, and if this happens a signal is emitted, thus we should update the cached value accordingly
Review of attachment 328759 [details] [review]: > GsdPowerManager: keep internal keyboard backlight in sync with UPower Please update with the actual style we use. ::: plugins/power/gsd-power-manager.c @@ +1955,3 @@ + GsdPowerManager *manager = GSD_POWER_MANAGER (user_data); + + if (g_strcmp0 (signal_name, "BrightnessChanged") == 0) { Please follow the style for one-line conditionals.
*** Bug 767036 has been marked as a duplicate of this bug. ***
I've recently independently wrote a patch fixing the same issue, see bug 773403 and only noticed this bug just now. Since this bug has not seen an updated patch in 5 months, and since my patch is more complete: 1) It properly removes the signal handler which the patch attached to this bug does not do. 2) It properly calls backlight_iface_emit_changed (if the brightness has actually changed, upower will also emit BrightnessChanged when g-s-d has just written it itself) I suggest marking this bug as a duplicate of bug 773403, which tracks the new patch.
*** This bug has been marked as a duplicate of bug 773403 ***