mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-01-03 13:50:14 +01:00
eis: require ei_seat and ei_devices
A client that skips on announcing those will get connected and immediately disconnected again. There's no point to libei if you support neither of those (at least for now).
This commit is contained in:
parent
df99fc923b
commit
e0d0c1af61
1 changed files with 11 additions and 4 deletions
|
|
@ -99,11 +99,18 @@ client_msg_done(struct eis_connection_setup *setup)
|
|||
eis_connection_setup_event_connection(setup, eis_connection_get_id(client->connection),
|
||||
eis_connection_get_version(client->connection));
|
||||
|
||||
client->setup = eis_connection_setup_unref(setup);
|
||||
/* These aren't required but libei is pointless without them, so let's enforce them
|
||||
* by establishing the connection and immediately sending the disconnect */
|
||||
if (setup->client_versions.ei_seat == 0 ||
|
||||
setup->client_versions.ei_device == 0) {
|
||||
eis_client_disconnect(client);
|
||||
} else {
|
||||
/* Force a ping/pong. This isn't necessary but it doesn't hurt much here
|
||||
* and it ensures that any client implementation doesn't have that part missing */
|
||||
eis_connection_ping(client->connection, pong, NULL);
|
||||
}
|
||||
|
||||
/* Force a ping/pong. This isn't necessary but it doesn't hurt much here
|
||||
* and it ensures that any client implementation doesn't have that part missing */
|
||||
eis_connection_ping(client->connection, pong, NULL);
|
||||
client->setup = eis_connection_setup_unref(setup);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue