[platforms/drm] Forward the mode changes to the OutputInterface
ClosedPublic

Authored by graesslin on Oct 31 2017, 4:13 PM.

Details

Summary

While KWin gained support for changing modes it did not yet forward it
to the Wayland OutputInterface. This change implements this missing todo
by finding the matching mode and marking it as current.

Test Plan

Run kinfocenter to verify the current mode is properly set.

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 created this revision.Oct 31 2017, 4:13 PM
Restricted Application added a project: KWin. · View Herald TranscriptOct 31 2017, 4:13 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
davidedmundson added inline comments.
plugins/platforms/drm/drm_output.cpp
273

This method is coded so that init() can be called twice.

Either:

  • that's pointless, and this should just be an assert that m_waylandOutput is null.
  • we need to make sure we don't do a double connect

(either through disconnecting or just putting the m_waylandOutput->setCurrentMode() call in ::updateMode

280

Every other setFooBar guards m_waylandOutput.

It seems currently superfuous, but as soon as we code up enabledChanged to work it'll be needed.

graesslin updated this revision to Diff 21660.Oct 31 2017, 5:17 PM

Add guard

Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptOct 31 2017, 5:17 PM
ngraham added a subscriber: ngraham.Nov 1 2017, 6:49 PM
davidedmundson accepted this revision.Nov 6 2017, 5:23 PM
This revision is now accepted and ready to land.Nov 6 2017, 5:23 PM
This revision was automatically updated to reflect the committed changes.