mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 17:30:06 +01:00
Improve the event queuing debugging a bit
Print a bit more information if this ifdef is disabled for debugging, in this case for button events. That's all I need for now, we can extend later. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1122>
This commit is contained in:
parent
5388299117
commit
530ca423a7
1 changed files with 13 additions and 1 deletions
|
|
@ -3183,7 +3183,19 @@ libinput_post_event(struct libinput *libinput,
|
|||
size_t new_out;
|
||||
|
||||
#if 0
|
||||
log_debug(libinput, "Queuing %s\n", event_type_to_str(event->type));
|
||||
char buf[1024] = { 0 };
|
||||
switch (event->type) {
|
||||
case LIBINPUT_EVENT_POINTER_BUTTON: {
|
||||
struct libinput_event_pointer *pev = libinput_event_get_pointer_event(event);
|
||||
snprintf(buf, sizeof(buf), "button: %u, state %s",
|
||||
libinput_event_pointer_get_button(pev),
|
||||
libinput_event_pointer_get_button_state(pev) == LIBINPUT_BUTTON_STATE_PRESSED ? "press" : "released");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
log_debug(libinput, "Queuing %s { %s }\n", event_type_to_str(event->type), buf);
|
||||
#endif
|
||||
|
||||
events_count++;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue