[WIP] Add output manager protocol
Created by: VincentVanlaer
Fixes #15 (closed) I still need to do a some descriptions and a final spell/grammar check, but the protocol itself can be reviewed. The protocol references the wl_output.transform enum, so it will only build on the alpha that was just released.
Prior art by KDE: https://cgit.kde.org/kwayland.git/tree/src/client/protocols/outputdevice.xml https://cgit.kde.org/kwayland.git/tree/src/client/protocols/output-management.xml
Difference with the KDE protocols
- One protocol instead of two. No preference either way, one protocol was just easier to write.
- Removed subpixel. Doesn't seem very relevant for configuring outputs.
- Removed make & model. Replaced by name & description.
- Removed phys size. Not sure whether it should be added or not, would be useful to have a constant dpi across all output devices.
- Removed EDID. Including EDID feels like an overkill.
- Removed uuid. Name + description should be sufficient. Besides, I don't think its a good idea to force compositors to remember stuff across restarts for a protocol like this.
- Removed scale. Replaced by size.
- Removed requirement that outputs should not overlap or cause gaps. This is i.m.o. compositor dependent.
- Added name & description.
- Added size. Similar to xdg-output's logical_size event. Allows for fractional scaling.
- Added disconnected. Outputs can be removed.
- Added destructors.
- Added the requirement that the server should try to rollback on failures.
- Added the requirement that only property changes requested explicitly by the client are applied. this improve consistency across compositors.
- Split mode into supported_mode and active_mode. Allows a client to set a custom mode.
Questions I still have:
- On a failed event, should we inform the client what caused the failure? Maybe an enum describing which request failed and the output the configuration change was applied to.
- What's the consensus on the copyright? Some descriptions are from the core protocol, the KDE protocol and xdg-output. I assume I need to add the copyright holders from those protocols as well?