meson: add option for internal event debugging

These have been behind #if 0 for ages but there are more to come, let's
make it possible to toggle those on/off with a meson option.

This is an option that must not be used in a release build, it will leak
key codes to the logs.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1156>
This commit is contained in:
Peter Hutterer 2025-03-13 09:29:11 +10:00 committed by Marge Bot
parent 9714253190
commit 8cd5cad1c1
4 changed files with 8 additions and 2 deletions

View file

@ -353,6 +353,8 @@ else
endif
############ libinput.so ############
config_h.set10('EVENT_DEBUGGING', get_option('internal-event-debugging'))
install_headers('src/libinput.h')
src_libinput = src_libfilter + [
'src/libinput.c',

View file

@ -34,3 +34,7 @@ option('zshcompletiondir',
type: 'string',
value: '',
description: 'Directory for zsh completion scripts ["no" disables]')
option('internal-event-debugging',
type: 'boolean',
value: false,
description: 'Enable additional internal event debug tracing. This will print key values to the logs and thus must never be enabled in a release build')

View file

@ -1063,7 +1063,7 @@ evdev_process_event(struct evdev_device *device, struct input_event *e)
struct evdev_dispatch *dispatch = device->dispatch;
uint64_t time = input_event_time(e);
#if 0
#if EVENT_DEBUGGING
evdev_print_event(device, e);
#endif

View file

@ -3193,7 +3193,7 @@ libinput_post_event(struct libinput *libinput,
size_t move_len;
size_t new_out;
#if 0
#if EVENT_DEBUGGING
libinput_print_queued_event(event);
#endif