Bug 321623

Summary: Brightness sliders do not update when changing backlight with keys
Product: [Unmaintained] plasma4 Reporter: Martin Klapetek <mklapetek>
Component: widget-batteryAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: kde
Priority: NOR    
Version: 4.10.80   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Martin Klapetek 2013-06-26 08:28:58 UTC
Macbook has keys for changing keyboard backlight. If I use keys to change the backlight, the slider in battery popup does not change but stays at the last set position.

Steps to reproduce:
1. Move the slider to 50%
2. Set the backlight down to 0% using keys
3. Check the widget, slider still at 50%
Comment 1 Kai Uwe Broulik 2013-06-26 08:55:35 UTC
Funny, I just discovered this behavior myself.
From what I know that was done on purpose to prevent races between the backend and the battery monitor which caused trouble in the past, eg. the battery monitor constantly setting a different brightness.
I already have an idea for that though. The problem definitly lies in the battery monitor as the powermanagement dataengine is updated properly (can be easily seen with plasmaengineexplorer, there the value is correct).

It's true for both brightness types (keyboard and backlight).
Comment 2 Kai Uwe Broulik 2013-06-26 09:44:50 UTC
Git commit 47e294c560dbef923cd86359dd23cd40942b0724 by Kai Uwe Broulik.
Committed on 26/06/2013 at 09:43.
Pushed by broulik into branch 'master'.

Fix screen brightness not being updated properly.
I moved the updateBrightness function to the logic.js but forgot that the pmSource
will not be available there. Now passing pmSource to the function. Works.

M  +6    -6    plasma/generic/applets/batterymonitor/contents/code/logic.js
M  +1    -1    plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml

http://commits.kde.org/kde-workspace/47e294c560dbef923cd86359dd23cd40942b0724