Get output position and scale from output device interface
ClosedPublic

Authored by romangg on Aug 27 2019, 12:44 PM.

Details

Summary

Let the data saved in OutputDeviceInterface be the single source of truth
and as low hanging fruits first do this for global position and scale.

Test Plan

Nested Wayland, Drm, virtual backends tested.

Diff Detail

Repository
R108 KWin
Branch
outputDeviceData
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 15693
Build 15711: arc lint + arc unit
romangg created this revision.Aug 27 2019, 12:44 PM
Restricted Application added a project: KWin. · View Herald TranscriptAug 27 2019, 12:44 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Aug 27 2019, 12:44 PM

I don't like how we have a period where an output will exist but any seemingly innocent call to geometry() before initWaylandOutputDevice() will crash.

I haven't looked through your whole patchset, but it's something to be wary of.

I don't like how we have a period where an output will exist but any seemingly innocent call to geometry() before initWaylandOutputDevice() will crash.

I haven't looked through your whole patchset, but it's something to be wary of.

No worries, I'm wary of it. At the moment in every backend plugin the output device init is basically directly after the output instance has been has been so I think we are save already. But long term we should tighten this up by making the API more explicit on that. The flow should be:

On startup:
platform exists -> wayland server started -> outputs queried -> everything else goes up

On output creation / hotplug:
platform plugin creates output -> output device init -> output enabled

davidedmundson accepted this revision.Aug 28 2019, 10:56 AM
This revision is now accepted and ready to land.Aug 28 2019, 10:56 AM
This revision was automatically updated to reflect the committed changes.