diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2022-05-06 13:44:58 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2022-05-06 14:04:59 +1000 |
commit | 200bc920ac5b770baea3796acf5cd634f8703545 (patch) | |
tree | f4b191d40d0b8470075c8afb35dea04e85ea337c | |
parent | f22d1938796a57c378e9ca5353beb1f0b0e99eb1 (diff) | |
download | libinput-200bc920ac5b770baea3796acf5cd634f8703545.tar.gz |
tools/record: fix indentation for libinput events
Commit 0cdf459643bfa6264bd2d1af8f7749529ebffee1
tools/record: get rid of indent push/pop, replace with fixed indents
Introduced some magic to detect if there's a '-' at the start of the
format string to fix the identation. This only works if the format
string is constant though, leading to an indentation error when record
is run with --with-libinput.
Fixes 0cdf459643bfa6264bd2d1af8f7749529ebffee1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | tools/libinput-record.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/libinput-record.c b/tools/libinput-record.c index 7ac6d257..a06055cc 100644 --- a/tools/libinput-record.c +++ b/tools/libinput-record.c @@ -1291,7 +1291,10 @@ handle_libinput_events(struct record_context *ctx, if (!e) return false; - iprintf(d->fp, I_EVENTTYPE, "%slibinput:\n", start_frame ? "- " : ""); + if (start_frame) + iprintf(d->fp, I_EVENTTYPE, "- libinput:\n"); + else + iprintf(d->fp, I_EVENTTYPE, "libinput:\n"); do { struct libinput_device *device = libinput_event_get_device(e); |