mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-01-04 05:00:14 +01:00
eis: send all our interface versions to the client
The protocol requires this only for interfaces that create client-side objects but let's do it here anyway to ensure the code is tested.
This commit is contained in:
parent
e0d60b062c
commit
059d3e11b6
1 changed files with 19 additions and 4 deletions
|
|
@ -118,10 +118,25 @@ client_msg_finish(struct eis_handshake *setup)
|
|||
return brei_result_new(EIS_CONNECTION_DISCONNECT_REASON_PROTOCOL,
|
||||
"Missing versions for required interfaces");
|
||||
|
||||
/* ei_callback needs a client-created object, so tell the client
|
||||
* about our version */
|
||||
eis_handshake_event_interface_version(setup, EIS_CALLBACK_INTERFACE_NAME,
|
||||
setup->client_versions.ei_callback);
|
||||
/* ei_callback needs a client-created object, so we must tell the client
|
||||
* about our version. But for convenience and to make sure this all works
|
||||
* send all our versions down the wire */
|
||||
#define SEND_INTERFACE_VERSION(upper_name_, lower_name_) \
|
||||
eis_handshake_event_interface_version(setup, upper_name_ ##_INTERFACE_NAME, \
|
||||
setup->client_versions.lower_name_);
|
||||
|
||||
SEND_INTERFACE_VERSION(EIS_CALLBACK, ei_callback);
|
||||
SEND_INTERFACE_VERSION(EIS_CONNECTION, ei_connection);
|
||||
SEND_INTERFACE_VERSION(EIS_PINGPONG, ei_pingpong);
|
||||
SEND_INTERFACE_VERSION(EIS_SEAT, ei_seat);
|
||||
SEND_INTERFACE_VERSION(EIS_DEVICE, ei_device);
|
||||
SEND_INTERFACE_VERSION(EIS_POINTER, ei_pointer);
|
||||
SEND_INTERFACE_VERSION(EIS_POINTER_ABSOLUTE, ei_pointer_absolute);
|
||||
SEND_INTERFACE_VERSION(EIS_BUTTON, ei_button);
|
||||
SEND_INTERFACE_VERSION(EIS_KEYBOARD, ei_keyboard);
|
||||
SEND_INTERFACE_VERSION(EIS_TOUCHSCREEN, ei_touchscreen);
|
||||
|
||||
#undef SEND_INTERFACE_VERSION
|
||||
|
||||
eis_client_setup_done(client, setup->name, setup->is_sender, &setup->client_versions);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue