Skip to content

daemon/controllers: rewrite ScreenBrightnessController::onDetectorDisplaysChanged

Xaver Hugl requested to merge work/zamundaaa/fix-restart into master

Instead of creating a list and checking which displays got added, removed or changed in one single loop, this splits it out into

  • creating the lists for the current displays
  • checking which got removed or replaced
  • checking which got added, or replaced and changed

This is a bit simpler to think about, and ensures invocations move displays from and to the external brightness control list properly

Commit 2: fix powerdevil not working when the compositor restarts

For compositor restarts to properly work, this also needs libkscreen!197 (merged) - otherwise it waits forever for a SetConfigOperation to finish, and brightness levels never get adjusted.

Merge request reports