Skip to content

Assorted tweaks for kwinbrightness

Jakob Petsovits requested to merge work/jpetso/kwinbrightness-tweaks into master

The set of commits to support !361 (merged) has grown long enough that perhaps a separate "kwinbrightness tweaks only" MR is warranted. Here's what's cooking:


daemon/controllers/kwinbrightness: Sort displays in order of priority


daemon/controllers/kwinbrightness: Set label manually for internal outputs

Internal outputs will now show up as "Built-in Screen".

Once KScreen (via KWin) provides a nicer string than it currently does, we can remove the part again that sets the current string. The i18nc() expression is reused from BacklightBrightness, so no extra work for translators.


daemon/controllers/kwinbrightness: Include EDID fetching

KWinBrightnessDisplay::label() uses the EDID vendor and name if available, so we should also ask for the EDID to be retrieved.

(I'm sort of at a loss about how this worked at all before. It seems like a correct change though, right?)


Removed from MR: daemon: Don't mix internal and external displays in legacy brightness controls Before the introduction of kwinbrightness, the legacy set of displays included either the internal laptop screen, or all external monitors. This was done by adding only displays from the same detector to the legacy set.

KWinDisplayDetector includes all kinds of displays, which means the behavior under Wayland was now different than under X11 where KWin is not used. Using kwinbrightness, internal and external displays would all be part of the same legacy set. Scrolling the brightness applet icon would adjust all displays whereas on X11 it would only adjust the laptop display.

To prevent this inconsistency, add an extra condition for displays in the legacy set to also match each other's isInternal() boolean. This restores the original behavior for the time being.

In the long run, we'll remove the legacy brightness API and associated display set, replacing it with a new per-display API.

Edited by Jakob Petsovits

Merge request reports