eis: don't send seat events unless the client supports ei_seat

This commit is contained in:
Peter Hutterer 2023-02-09 15:41:00 +10:00
parent 20e425a48d
commit 2e4d984819

View file

@ -175,6 +175,10 @@ client_send_disconnect(struct eis_client *client, const char *reason)
static int
client_send_seat_added(struct eis_client *client, struct eis_seat *seat)
{
/* Client didn't announce ei_seat */
if (client->interface_versions.ei_seat == 0)
return 0;
return eis_connection_event_seat(client->connection, eis_seat_get_id(seat),
eis_seat_get_version(seat));
}