Commit bcfa9123 authored by Nikolai Kondrashov's avatar Nikolai Kondrashov Committed by Peter Hutterer

Increase interactiveness of test* output

Force line buffering for test and test_xi2 to increase interactiveness and
avoid losing data with non-terminal stdout. This fixes capturing xinput
test* output into a file.
Signed-off-by: Nikolai Kondrashov's avatarNikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 9071787a
......@@ -98,6 +98,8 @@ print_events(Display *dpy)
{
XEvent Event;
setlinebuf(stdout);
while(1) {
XNextEvent(dpy, &Event);
......
......@@ -326,6 +326,8 @@ test_xi2(Display *display,
int deviceid = -1;
int rc;
setlinebuf(stdout);
rc = list(display, argc, argv, name, desc);
if (rc != EXIT_SUCCESS)
return rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment