ei: print the sequence number on error for a start_emulating event

This may help debugging which sequence triggered an error.

Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/330>
This commit is contained in:
Peter Hutterer 2025-05-01 11:48:16 +10:00 committed by Marge Bot
parent e147d4311f
commit 247a3d49d7

View file

@ -336,7 +336,9 @@ handle_msg_start_emulating(struct ei_device *device, uint32_t serial, uint32_t s
case EI_DEVICE_STATE_EMULATING:
case EI_DEVICE_STATE_REMOVED_FROM_SERVER:
result = brei_result_new(EI_CONNECTION_DISCONNECT_REASON_PROTOCOL,
"Invalid device state %u for a start_emulating event", device->state);
"Invalid device state %u for a start_emulating event (sequence %u)",
device->state,
sequence);
break;
case EI_DEVICE_STATE_RESUMED:
ei_queue_device_start_emulating_event(device, sequence);