Show config selection OSD when display button is pressed
ClosedPublic

Authored by sebas on Feb 27 2018, 5:17 PM.

Details

Summary

This makes the working of the display button much more intuitive.

FEATURE: 390096

Test Plan

Tested with external display plugged in, system behaves as expected

Diff Detail

Repository
R104 KScreen
Branch
sebas/displaybutton
Lint
No Linters Available
Unit
No Unit Test Coverage
sebas created this revision.Feb 27 2018, 5:17 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 27 2018, 5:17 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sebas requested review of this revision.Feb 27 2018, 5:17 PM
ngraham retitled this revision from show config selection osd when display button is pressed to Show config selection OSD when display button is pressed.Feb 27 2018, 5:22 PM
ngraham edited the summary of this revision. (Show Details)
dvratil requested changes to this revision.Feb 27 2018, 9:31 PM

Hmm, I guess you can now kill m_buttonTimer, m_iteration, resetDisplaySwitch() and applyGenericConfig() as well, as those are used exclusively by the config iteration. You probably also want to check if the Selection OSD is already shown, otherwise pressing the Display Button multiple times would create multiple OSDs.

This revision now requires changes to proceed.Feb 27 2018, 9:31 PM
sebas added a comment.Feb 28 2018, 9:53 AM

OsdManager::showActionSelector() will delete existing OSDs before showing a new one, so we won't create multiple OSDs. That's arguably not as nice as tracking if it's already shown, but I think I'd rather avoid the added complexity of adding a check if it's already there, if that's OK from your POV.

As to the other cleanups: Good point, I'll submit an updated version of this patch shortly.

sebas updated this revision to Diff 28251.Feb 28 2018, 9:59 AM
  • clean up now-dead code
dvratil accepted this revision.Feb 28 2018, 6:00 PM
This revision is now accepted and ready to land.Feb 28 2018, 6:00 PM
This revision was automatically updated to reflect the committed changes.