Display brightness OSD notification

Felix Geyer debfx-pkg at fobos.de
Thu Apr 8 14:25:55 BST 2010


Hi,

I'm proposing a patch that addresses these issues:
- KDE doesn't provide an OSD notification when the user changes the
display brightness.
- The brightness Fn keys don't have an effect if they aren't handled by
the kernel/hardware.

The OSD is implemented in PowerDevil and the battery applet:
PowerDevil uses a KActionCollection to register the
Qt::Key_MonBrightnessUp/Down keys
and notifies the battery applet by emitting the brightnessChanged() signal.
The applet currently uses a copy of the OSDWidget class from KMix. This
needs to be
improved so both components can share the OSD code, but I'm not sure how
to do it.

To prevent a double increase/decrease of the brightness on a Fn key
press, Solid notifies
PowerDevil of every brightness change. On a key press PowerDevil then
compares the
current brightness value with the cached one. Only if both are equal it
changes the
brightness. Additionally it checks the brightness_in_hardware HAL
property. This behaviour
is consistent with gnome-power-manager using the HAL backend.

Greetings,
Felix

-------------- next part --------------
A non-text attachment was scrubbed...
Name: brightness_fn_keys_and_osd.diff
Type: text/x-patch
Size: 23187 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100408/9dc2cec1/attachment.bin>


More information about the kde-core-devel mailing list