add osd slot for screen layout changes
ClosedPublic

Authored by sebas on Sep 8 2016, 1:09 PM.

Details

Summary

This patch adds an OSD to the dbus object so we can hook up layout changes of the XF86Display button. The method isn't really specific to screen osds, but still called like that (it could be given a generic name, since it's basically just a message and an icon to be specified. This current solution is in line with the rest of the code, though.

Test Plan

Test from kscreen's kded, icon and text show up. Didn't test with multiscreen yet (I think this osd should show up on both screens, will do that once off the train).

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sebas updated this revision to Diff 6548.Sep 8 2016, 1:09 PM
sebas retitled this revision from to add osd slot for screen layout changes.
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 TranscriptSep 8 2016, 1:09 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik added a subscriber: broulik.Sep 8 2016, 1:13 PM

I think this osd should show up on both screens, will do that once off the train

Makes sense for the screen OSD but I rather not have my volume OSD show up on both screens.

sebas added a comment.Sep 8 2016, 2:20 PM

yeah ... I don't think it does it right now, and it's perhaps not that critical for now. Anyway, I'll have a look later on, if you have comments on my patch as is, they're welcome to compress the review process a bit.

sebas updated this revision to Diff 6562.Sep 8 2016, 7:18 PM

just export showText, instead of adding a redirection

This makes the patch rather simpler and adds a generic method to the dbus
object, rather than a specialized name of the call: so showText() vs.
screenLayoutChanged().

sebas added a comment.Sep 8 2016, 9:44 PM

I had a look at showing the OSD on all screens, and it isn't looking very simple. The situation is as follows:

In kscreen, we already have an OSDs, the one when you click on the "Identify" button in bottom right corner the display configuration module's layout view. This isn't styled (it just used text and background color), and of course it doesn't work on wayland, the osd is placed more or less randomly).
Then, we have the XF86Display button, which currently does things that the user may or may not understand, we want to help that a bit by displaying an OSD.

Bottom line: let's get something simple (just showing the osd with the video-display icon and a short description of the new layout) when the button is pressed for 5.8.
For 5.9+, this should be redone so both OSDs use decent Plasma styling, and the XF86Display button shows an OSD cycling through the modes, so the user also sees what happens when she presses the button again (behaves a bit like alt-tab then).

mart accepted this revision.Sep 9 2016, 12:14 PM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Sep 9 2016, 12:14 PM
This revision was automatically updated to reflect the committed changes.