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.
Details
- Reviewers
davidedmundson - Group Reviewers
KWin - Maniphest Tasks
- T11459: AbstractWaylandOutput and output device consolidation
- Commits
- R108:819609a8a6b4: Get output position and scale from output device interface
Nested Wayland, Drm, virtual backends tested.
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.
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