wayland: Use the preferred order of displays exposed by KDE

KDE provides the kde_output_order_v1 protocol, which tells clients the preferred order of all connected displays. Sort SDL displays according to the provided list at init time.
This commit is contained in:
Frank Praznik
2024-01-26 18:15:27 -05:00
parent e0c2cca629
commit e71e16950a
3 changed files with 155 additions and 17 deletions
+33
View File
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="kde_output_order_v1">
<copyright><![CDATA[
SPDX-FileCopyrightText: 2022 Xaver Hugl <xaver.hugl@gmail.com>
SPDX-License-Identifier: MIT-CMU
]]></copyright>
<interface name="kde_output_order_v1" version="1">
<description summary="announce order of outputs">
Announce the order in which desktop environment components should be placed on outputs.
The compositor will send the list of outputs when the global is bound and whenever there is a change.
</description>
<event name="output">
<description summary="output name">
Specifies the output identified by their wl_output.name.
</description>
<arg name="output_name" type="string" summary="the name of the output"/>
</event>
<event name="done">
<description summary="done">
Specifies that the output list is complete. On the next output event, a new list begins.
</description>
</event>
<request name="destroy" type="destructor">
<description summary="Destroy the output order notifier."/>
</request>
</interface>
</protocol>