tools: fflush the output in debug-events after each set of events
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 12 Jan 2023 23:23:52 +0000 (09:23 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 12 Jan 2023 23:28:32 +0000 (09:28 +1000)
commit0266428c9300a18cec44786d84d5502b89c1e6eb
treecc1709c29589112f79885265b9873fdb607d3fda
parent29a49e968e67eb7bf6d63c9f93b06ee983772018
tools: fflush the output in debug-events after each set of events

Fixes e.g. the case where debug-events is used to get the initial device
list but no more. Since we never flush, the content is stuck in the
buffers and gets lost.

Easy way to reproduce: `libinput debug-events | cat`, then ctrl+c and see
nothing show up (before this patch, anyway).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tools/libinput-debug-events.c