Add serial number and EISA ID to OutputDevice interface
ClosedPublic

Authored by davidedmundson on Jan 23 2018, 12:03 PM.

Diff Detail

Repository
R127 KWayland
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dvratil created this revision.Jan 23 2018, 12:03 PM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
dvratil requested review of this revision.Jan 23 2018, 12:03 PM
davidedmundson added inline comments.
src/client/protocols/outputdevice.xml
31–32

you need to bump this

src/server/outputdevice_interface.cpp
520

You're not actually sending the serial number or eisa anywhere..

The others do it in sendGeometry (including the manufacturer)

When you do add it, you need to check the client is bound with version 2, otherwise you'll crash the client.

Something like
if(wl_proxy_get_version(resourceOfBoundClient) >= ORG_KDE_KWIN_SETSERIAL_SINCE_VERSION) {

org_kde_output_...
dvratil marked 2 inline comments as done.Jan 23 2018, 12:31 PM
dvratil added inline comments.
src/server/outputdevice_interface.cpp
520

I am sending the stuff in sendGeometry() (see right above)

dvratil updated this revision to Diff 25806.Jan 23 2018, 12:31 PM
dvratil marked an inline comment as done.

Fix versioning

graesslin requested changes to this revision.Jan 24 2018, 4:48 PM
graesslin added inline comments.
src/client/protocols/outputdevice.xml
109–112

I'm not sure whether it's allowed to add arguments to an existing event. This would result in incompatibilities. You can make the server only emit to clients having the version, but then you actually broke any client which only has version 1.

To be really compatible you need to add a new event.

This revision now requires changes to proceed.Jan 24 2018, 4:48 PM
Restricted Application edited subscribers, added: kde-frameworks-devel; removed: Frameworks. · View Herald TranscriptJul 2 2018, 12:31 PM

In another patch I'm doing a V2 of this interface in the next frameworks cycle.
May as well try to merge this at the same time so we only have 1 version bump?

@dvratil want me to finish this?

@dvratil want me to finish this?

@davidedmundson Yes, I'd appreciate it. I won't have time to look into this any time soon, sorry :(

davidedmundson commandeered this revision.Jul 25 2018, 8:25 PM
davidedmundson added a reviewer: dvratil.

Instead of modifying the geometry event use two new events to remain
fully compatiable.

exciting whitespace change

romangg added inline comments.
src/client/outputdevice.cpp
161

Unrelated change.

src/server/outputdevice_interface.cpp
153

needs fix

407

Why change? Unrelated.

src/server/outputdevice_interface.h
50

What do you mean with "needs to be explicit"?

Remove unrelated changes

I just removed handling of dynamically updating eisa/serialNumber it doesn't seem to be something that makes sense for it to change at runtime.

Also I don't want to copy the current setEdid pattern, which is broken ATM. Whenever any new client connects it broadcasts a change to every connected client...
I need to follow that up in another patch, possibly by making it static like these two.

I just removed handling of dynamically updating eisa/serialNumber it doesn't seem to be something that makes sense for it to change at runtime.

Also I don't want to copy the current setEdid pattern, which is broken ATM. Whenever any new client connects it broadcasts a change to every connected client...
I need to follow that up in another patch, possibly by making it static like these two.

Can you explain both points a bit more? Maybe when updating the Summary.

Bug explained with a fix here D14505

romangg accepted this revision.Aug 8 2018, 2:35 PM
This revision was not accepted when it landed; it landed in state Needs Review.Aug 8 2018, 5:55 PM
This revision was automatically updated to reflect the committed changes.