Announce output changes to Wayland for platforms not handling outputs
ClosedPublic

Authored by graesslin on Jul 20 2016, 9:48 AM.

Details

Summary

Most platforms like the nested and virtual do not handle the outputs
themselves and WaylandServer announces the Outputs to Wayland.

So far this was static: at startup it got announced once to Wayland
and any changes were not catched.

This change makes WaylandServer listen to changes to the Screens and
sync them to Wayland.

Unfortunately KWin's internal Screen information is not sufficient to
properly synchronize this to Wayland and also Wayland by not supporting
adding/removing modes does not help.

Thus the solution implemented here is to add new outputs reflecting the
changes and then removing the old ones. This creates situations with more
outputs being present than actually there, but prevents that there are
no outputs at all.

Test Plan

Auto test added which verifies this for the virtual platform

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 5347.Jul 20 2016, 9:48 AM
graesslin retitled this revision from to Announce output changes to Wayland for platforms not handling outputs.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added reviewers: KWin, Plasma on Wayland.
Restricted Application added projects: Plasma on Wayland, KWin. · View Herald TranscriptJul 20 2016, 9:48 AM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
bshah added a subscriber: bshah.Jul 20 2016, 11:09 AM
bshah added inline comments.
plugins/platforms/virtual/screens_virtual.cpp
41

Remove this comment?

sebas accepted this revision.Jul 20 2016, 11:35 AM
sebas added a reviewer: sebas.
sebas added a subscriber: sebas.

Looks good to me.

This revision is now accepted and ready to land.Jul 20 2016, 11:35 AM
graesslin marked an inline comment as done.Jul 20 2016, 11:53 AM
bshah accepted this revision.Jul 20 2016, 11:53 AM
bshah added a reviewer: bshah.
This revision was automatically updated to reflect the committed changes.