Rebased, added implementations for the new id()
and label()
getters in KWinDisplayBrightness
, and tweaked display change handling for robustness against display object deletion before displaysChanged()
(which I believe happens to KWinBrightness
objects, although untested).
@zamundaaa, could you have a look if I used libkscreen correctly for the id()
and label()
implementations? I'd also take a full review (or from @nclarius) if you have time, maybe we can still manage to merge per-display brightness controls for 6.1, but perhaps it'll be too close a call anyway.
Rough plan after this:
- Polish and submit my patch for taking out
brightnessChanged()
fromDisplayBrightness
, except for actual external changes (allows for tracking D-Bus client caller context without piping it through). - Rework my patch to control dimming with a multiplier instead of storing brightness values, make an MR. Reduced scope: only dimming the first detector's display(s) as we currently do, to avoid regressions and unforeseen extra work.
- Expose the new API to D-Bus. Perhaps as another action altogether, independent from
BrightnessControl
which can keep the legacy API. - Pick it all up in the Brightness applet and put brightness controls into a Repeater for each display.
- Leave the KCM as is. Legacy API still works, we can rework this later.