[platforms/x11/standalone] Port to AbstractOutput
ClosedPublic

Authored by romangg on Feb 21 2019, 7:14 PM.

Details

Summary

Represent outputs in the X11 session via AbstractOutput. For that we
move all Wayland specific parts of AbstractOutput into a new subclass
AbstractWaylandOutput and let the outputs of our Wayland backends inherit
from there.

This should allow us to get rid of the Screens class later on.

Test Plan

Manually in X session.

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.
romangg created this revision.Feb 21 2019, 7:14 PM
Restricted Application added a project: KWin. · View Herald TranscriptFeb 21 2019, 7:14 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Feb 21 2019, 7:14 PM
zzag added a subscriber: zzag.Apr 26 2019, 12:19 PM

I don't quite like that XRandRScreens::update() was moved to the platform code, but I guess we could revisit it later on.

abstract_output.h
5

I think it should be "2018, 2019"

autotests/CMakeLists.txt
261–262

No, I think we should keep the test. How about turning TestXRandRScreens into an integration test instead?

zzag added a comment.Wed, Jun 5, 11:39 AM

Could you please rebase this patch against master? (Qt 5.13 contains some breaking changes in QPA)

autotests/CMakeLists.txt
261–262

After thinking for a while, I think there is no any value behind this test, so we could drop it. I still think that we need some tests to verify that KWin works correctly when an output gets added or removed, but this is completely unrelated to what this patch intends to achieve.

romangg updated this revision to Diff 59356.Fri, Jun 7, 6:03 PM
  • Remove xrandr test
  • Rebase on master
In D19208#474577, @zzag wrote:

Could you please rebase this patch against master? (Qt 5.13 contains some breaking changes in QPA)

When rebasing I didn't notice implications by such changes. Maybe I overlooked them?

zzag accepted this revision.Tue, Jun 11, 10:20 AM

Some style nitpicks. Given how intrusive this change is please wait for another "Ship it" from KWin.

plugins/platforms/x11/standalone/x11_platform.cpp
38

Coding style nitpick: this include directive should be below line 45, i.e. below

#include "x11_decoration_renderer.h"
plugins/platforms/x11/standalone/x11_platform.h
108

Coding style nitpick: missing whitespace between the asterisk and X11Output

QVector<X11Output *> m_outputs;
This revision is now accepted and ready to land.Tue, Jun 11, 10:20 AM
davidedmundson accepted this revision.Tue, Jun 11, 11:47 PM
This revision was automatically updated to reflect the committed changes.