eis: make sure our connection setup has the right version too

This commit is contained in:
Peter Hutterer 2023-02-03 15:48:50 +10:00
parent aaf72f9263
commit bcece3d3c1
3 changed files with 4 additions and 0 deletions

View file

@ -694,6 +694,7 @@ eis_client_new(struct eis *eis, int fd)
client->interface_versions = (struct eis_client_interface_versions){
.ei_connection = VERSION_V(1),
.ei_connection_setup = VERSION_V(1),
.ei_callback = VERSION_V(1),
.ei_seat = VERSION_V(1),
};

View file

@ -39,6 +39,7 @@ enum eis_client_state {
struct eis_client_interface_versions {
uint32_t ei_connection;
uint32_t ei_connection_setup;
uint32_t ei_callback;
uint32_t ei_seat;
};

View file

@ -132,6 +132,7 @@ client_msg_interface(struct eis_connection_setup *setup, const char *name, uint3
}
VERSION_ENTRY(ei_callback),
VERSION_ENTRY(ei_connection),
VERSION_ENTRY(ei_connection_setup),
VERSION_ENTRY(ei_seat),
#undef VERSION_ENTRY
};
@ -178,6 +179,7 @@ eis_connection_setup_new(struct eis_client *client, uint32_t new_id,
setup->proto_object.id = new_id;
setup->proto_object.implementation = setup;
setup->proto_object.interface = &eis_connection_setup_proto_interface;
setup->proto_object.version = versions->ei_connection_setup;
list_init(&setup->proto_object.link);
setup->version = VERSION_V(1); /* our ei-connection-setup version */