Add supported transformations to OutputDevice
AcceptedPublic

Authored by graesslin on Nov 4 2017, 4:23 PM.

Details

Reviewers
sebas
davidedmundson
Group Reviewers
Frameworks
KWin
Plasma
Summary

The server can announce all supported transformations on an OutputDevice.
The rational for this change is a requirement recognized in KWin in
combination with KScreen: KScreen should not offer to transform a screen
in a way which KWin cannot support. This API can fill the need.

Diff Detail

Repository
R127 KWayland
Branch
supported-transformations
Lint
No Linters Available
Unit
No Unit Test Coverage
graesslin created this revision.Nov 4 2017, 4:23 PM
Restricted Application added projects: Plasma on Wayland, Frameworks. · View Herald TranscriptNov 4 2017, 4:23 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson added inline comments.
src/client/protocols/outputdevice.xml
225

enum="transform"
also uint

src/server/outputdevice_interface.cpp
470

we have the initial send which is all fine

Then you've got this dynamically add them.
But at a protocol level we have no way to remove and replace.
That's somewhat broken.

Personally, I'd just make it a static and document that it must be sent before the first done()

graesslin added inline comments.Nov 4 2017, 5:39 PM
src/server/outputdevice_interface.cpp
470

I'm not 100 % sure whether we can in KWin determine the supported rotations in all cases before the OutputDeviceInterface is fully setup. Thus I wanted to have a little bit of flexibility here.

Also if we need it we can add a remove. If we go for a static approach, we cannot remove again.

graesslin updated this revision to Diff 21872.Nov 4 2017, 5:42 PM

enum and uint

Restricted Application edited projects, added Plasma; removed Plasma on Wayland. · View Herald TranscriptNov 4 2017, 5:42 PM
sebas accepted this revision.Nov 7 2017, 5:53 PM
sebas added a subscriber: sebas.
sebas added inline comments.
src/client/outputdevice.h
244

5.40 I guess :)

src/server/outputdevice_interface.h
133

5.40

This revision is now accepted and ready to land.Nov 7 2017, 5:53 PM
davidedmundson accepted this revision.Dec 6 2017, 1:28 PM

The comment about being static needs to be in the protocol xml too. Then this is good to go.

( though what's your reasoning for not just having the argument as a Wayland array ?)

Restricted Application edited projects, added Plasma on Wayland; removed Plasma. · View Herald TranscriptDec 6 2017, 1:28 PM

The comment about being static needs to be in the protocol xml too. Then this is good to go.

( though what's your reasoning for not just having the argument as a Wayland array ?)

I didn't think of it. Just followed the existing way to announce modes.

Restricted Application edited projects, added Plasma; removed Plasma on Wayland. · View Herald TranscriptDec 6 2017, 4:17 PM
Restricted Application edited projects, added Plasma on Wayland; removed Plasma. · View Herald TranscriptJan 19 2018, 9:46 AM