[kded] fix monitoring for newly appearing outputs
ClosedPublic

Authored by sebas on Aug 9 2016, 1:01 AM.

Details

Summary

This patch makes the kded daemon monitor also newly connected outputs,
and leads to correctly initialize outputs from a docking station plugged
in after session start.

For "internal" display connector ports (HDMI, DisplayPort, etc.
integrated in the system, we know from the start that they exist. These
are marked disconnected. When plugging in a docking station, new outputs
(that aren't previously known as disconnected) appear. daemon.cpp only
monitors outputs that change connection state, so it doesn't consider
newly added outputs.

By listening to KScreen::Config::outputAdded, we can detect new output
(connectors) as well, so we can trigger the applyConfig code path, which
leads to restoring the config.

BUG:366346

Test Plan

confirmed it fixes the problem on my system (Lenovo Onelink+ docking
station which shows the same behaviour).

  • Added debug calls and confirmed the new outputs are correctly set up.

auto-testing this seems to be close to impossible. :/

Diff Detail

Repository
R104 KScreen
Branch
sebas/newdockoutputs
Lint
No Linters Available
Unit
No Unit Test Coverage
sebas updated this revision to Diff 5746.Aug 9 2016, 1:01 AM
sebas retitled this revision from to [kded] fix monitoring for newly appearing outputs.
sebas updated this object.
sebas edited the test plan for this revision. (Show Details)
sebas added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptAug 9 2016, 1:01 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sebas updated this revision to Diff 5747.Aug 9 2016, 1:23 AM
  • use unique connection
sebas updated this revision to Diff 5770.Aug 9 2016, 11:56 AM
  • Also connect disconnected outputs
davidedmundson accepted this revision.Aug 9 2016, 12:20 PM
davidedmundson added a reviewer: davidedmundson.
This revision is now accepted and ready to land.Aug 9 2016, 12:20 PM
graesslin accepted this revision.Aug 9 2016, 12:20 PM
graesslin added a reviewer: graesslin.
This revision was automatically updated to reflect the committed changes.