Display brightness OSD even when min and max is reached
ClosedPublic

Authored by thsurrel on May 22 2018, 6:55 AM.

Details

Summary

When the brightness is already at the maximum (or minimum) value,
hitting the keyboard shortcut to increase (resp. decrease) it does
not bring up the OSD, there is no visual feedback.
This is not consistent either with the volume which handles this
correctly.

BUG: 387284
FIXED-IN: 5.14.0

Diff Detail

Repository
R122 Powerdevil
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
thsurrel created this revision.May 22 2018, 6:55 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 22 2018, 6:55 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
thsurrel requested review of this revision.May 22 2018, 6:55 AM
broulik added inline comments.
daemon/backends/upower/powerdevilupowerbackend.cpp
406 ↗(On Diff #34622)

Can we be sure that the currentBrightness is always up-to-date? We must still be able to force a new brightness if the hardware forgot to tell us or changed it outside our realm of influence

thsurrel updated this revision to Diff 34624.May 22 2018, 7:42 AM
thsurrel marked an inline comment as done.May 22 2018, 7:50 AM
thsurrel added inline comments.
daemon/backends/upower/powerdevilupowerbackend.cpp
406 ↗(On Diff #34622)

I removed the condition since it does not bring much value anyway.

ngraham accepted this revision.May 22 2018, 7:17 PM
ngraham added a subscriber: ngraham.

Works great for me! @broulik?

This revision is now accepted and ready to land.May 22 2018, 7:17 PM
thsurrel planned changes to this revision.May 23 2018, 3:05 PM
thsurrel marked an inline comment as done.

I think we should do the same thing for the other side of the spectrum: when hitting the minimum value, we should still show the OSD as well.
On my laptop, the screen turns completely black so I did not think about it, but that is probably not the case for all screens.

thsurrel updated this revision to Diff 34751.May 23 2018, 8:23 PM
thsurrel retitled this revision from Always display brightness OSD even when at maximum to Display brightness OSD even when min and max is reached.
thsurrel edited the summary of this revision. (Show Details)

Handle the minimum case as well.

This revision is now accepted and ready to land.May 23 2018, 8:23 PM
romangg accepted this revision.May 24 2018, 1:05 PM
romangg added a subscriber: romangg.

Works for me (can't test minimum case since screen is dark then) and good usability improvement.

Please in next patches import the context of the diff to Phab (either use arc or git diff -U99999 ....

ngraham edited the summary of this revision. (Show Details)May 24 2018, 1:40 PM
This revision was automatically updated to reflect the committed changes.