diff --git a/meson.build b/meson.build index 4d51d014..2cc173dc 100644 --- a/meson.build +++ b/meson.build @@ -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', diff --git a/meson_options.txt b/meson_options.txt index 4fe8e499..047647f7 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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') diff --git a/src/evdev.c b/src/evdev.c index c014d785..39c37209 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -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 diff --git a/src/libinput.c b/src/libinput.c index f6b0b4cc..037075ab 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -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