Skip to content

Commit bdc5174

Browse files
committed
DisplayServer (Linux): upgrades kde-output-device-v2 wayland protocol files (again)
Fixes #2093
1 parent bc869f1 commit bdc5174

File tree

3 files changed

+62
-4
lines changed

3 files changed

+62
-4
lines changed

src/detection/displayserver/linux/wayland/kde-output-device-v2-client-protocol.h

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,11 @@ enum kde_output_device_v2_capability {
239239
* @since 17
240240
*/
241241
KDE_OUTPUT_DEVICE_V2_CAPABILITY_SHARPNESS = 0x1000,
242+
/**
243+
* if this outputdevice supports custom modes
244+
* @since 18
245+
*/
246+
KDE_OUTPUT_DEVICE_V2_CAPABILITY_CUSTOM_MODES = 0x2000,
242247
};
243248
/**
244249
* @ingroup iface_kde_output_device_v2
@@ -280,6 +285,10 @@ enum kde_output_device_v2_capability {
280285
* @ingroup iface_kde_output_device_v2
281286
*/
282287
#define KDE_OUTPUT_DEVICE_V2_CAPABILITY_SHARPNESS_SINCE_VERSION 17
288+
/**
289+
* @ingroup iface_kde_output_device_v2
290+
*/
291+
#define KDE_OUTPUT_DEVICE_V2_CAPABILITY_CUSTOM_MODES_SINCE_VERSION 18
283292
#endif /* KDE_OUTPUT_DEVICE_V2_CAPABILITY_ENUM */
284293

285294
#ifndef KDE_OUTPUT_DEVICE_V2_VRR_POLICY_ENUM
@@ -794,6 +803,23 @@ struct kde_output_device_v2_listener {
794803
void (*sharpness)(void *data,
795804
struct kde_output_device_v2 *kde_output_device_v2,
796805
uint32_t sharpness);
806+
/**
807+
* output priority
808+
*
809+
* Describes the position of the output in the output order list,
810+
* with lower values being earlier in the list. There's no specific
811+
* value the list has to start at, this value is only used in
812+
* sorting outputs.
813+
*
814+
* Note that the output order protocol is not sufficient for this,
815+
* as an output may not be in the output order if it's disabled or
816+
* mirroring another screen.
817+
* @param priority priority
818+
* @since 18
819+
*/
820+
void (*priority)(void *data,
821+
struct kde_output_device_v2 *kde_output_device_v2,
822+
uint32_t priority);
797823
};
798824

799825
/**
@@ -943,6 +969,10 @@ kde_output_device_v2_add_listener(struct kde_output_device_v2 *kde_output_device
943969
* @ingroup iface_kde_output_device_v2
944970
*/
945971
#define KDE_OUTPUT_DEVICE_V2_SHARPNESS_SINCE_VERSION 17
972+
/**
973+
* @ingroup iface_kde_output_device_v2
974+
*/
975+
#define KDE_OUTPUT_DEVICE_V2_PRIORITY_SINCE_VERSION 18
946976

947977

948978
/** @ingroup iface_kde_output_device_v2 */
@@ -972,6 +1002,18 @@ kde_output_device_v2_destroy(struct kde_output_device_v2 *kde_output_device_v2)
9721002
wl_proxy_destroy((struct wl_proxy *) kde_output_device_v2);
9731003
}
9741004

1005+
#ifndef KDE_OUTPUT_DEVICE_MODE_V2_FLAGS_ENUM
1006+
#define KDE_OUTPUT_DEVICE_MODE_V2_FLAGS_ENUM
1007+
/**
1008+
* @ingroup iface_kde_output_device_mode_v2
1009+
* mode flags
1010+
*/
1011+
enum kde_output_device_mode_v2_flags {
1012+
KDE_OUTPUT_DEVICE_MODE_V2_FLAGS_CUSTOM = 0x1,
1013+
KDE_OUTPUT_DEVICE_MODE_V2_FLAGS_REDUCED_BLANKING = 0x2,
1014+
};
1015+
#endif /* KDE_OUTPUT_DEVICE_MODE_V2_FLAGS_ENUM */
1016+
9751017
/**
9761018
* @ingroup iface_kde_output_device_mode_v2
9771019
* @struct kde_output_device_mode_v2_listener
@@ -1017,6 +1059,15 @@ struct kde_output_device_mode_v2_listener {
10171059
*/
10181060
void (*removed)(void *data,
10191061
struct kde_output_device_mode_v2 *kde_output_device_mode_v2);
1062+
/**
1063+
* mode flags
1064+
*
1065+
* This event describes the mode's flags.
1066+
* @since 19
1067+
*/
1068+
void (*flags)(void *data,
1069+
struct kde_output_device_mode_v2 *kde_output_device_mode_v2,
1070+
uint32_t flags);
10201071
};
10211072

10221073
/**
@@ -1046,6 +1097,10 @@ kde_output_device_mode_v2_add_listener(struct kde_output_device_mode_v2 *kde_out
10461097
* @ingroup iface_kde_output_device_mode_v2
10471098
*/
10481099
#define KDE_OUTPUT_DEVICE_MODE_V2_REMOVED_SINCE_VERSION 1
1100+
/**
1101+
* @ingroup iface_kde_output_device_mode_v2
1102+
*/
1103+
#define KDE_OUTPUT_DEVICE_MODE_V2_FLAGS_SINCE_VERSION 19
10491104

10501105

10511106
/** @ingroup iface_kde_output_device_mode_v2 */

src/detection/displayserver/linux/wayland/kde-output-device-v2-protocol.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,25 +67,27 @@ static const struct wl_message kde_output_device_v2_events[] = {
6767
{ "automatic_max_bits_per_color_limit", "15u", kde_output_device_v2_types + 0 },
6868
{ "edr_policy", "16u", kde_output_device_v2_types + 0 },
6969
{ "sharpness", "17u", kde_output_device_v2_types + 0 },
70+
{ "priority", "18u", kde_output_device_v2_types + 0 },
7071
};
7172

7273
WL_EXPORT const struct wl_interface kde_output_device_v2_interface = {
73-
"kde_output_device_v2", 17,
74+
"kde_output_device_v2", 19,
7475
0, NULL,
75-
34, kde_output_device_v2_events,
76+
35, kde_output_device_v2_events,
7677
};
7778

7879
static const struct wl_message kde_output_device_mode_v2_events[] = {
7980
{ "size", "ii", kde_output_device_v2_types + 0 },
8081
{ "refresh", "i", kde_output_device_v2_types + 0 },
8182
{ "preferred", "", kde_output_device_v2_types + 0 },
8283
{ "removed", "", kde_output_device_v2_types + 0 },
84+
{ "flags", "19u", kde_output_device_v2_types + 0 },
8385
};
8486

8587
WL_EXPORT const struct wl_interface kde_output_device_mode_v2_interface = {
86-
"kde_output_device_mode_v2", 1,
88+
"kde_output_device_mode_v2", 19,
8789
0, NULL,
88-
4, kde_output_device_mode_v2_events,
90+
5, kde_output_device_mode_v2_events,
8991
};
9092

9193
#endif

src/detection/displayserver/linux/wayland/kde-output.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ static struct kde_output_device_v2_listener outputListener = {
178178
.automatic_max_bits_per_color_limit = (void*) stubListener,
179179
.edr_policy = (void*) stubListener,
180180
.sharpness = (void*) stubListener,
181+
.priority = (void*) stubListener,
181182
};
182183

183184
const char* ffWaylandHandleKdeOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version)

0 commit comments

Comments
 (0)