force line-buffered stdout if stdout is not a tty
parent
c70db2d06a
commit
deb48ff48b
4
dwl.c
4
dwl.c
|
@ -1674,7 +1674,6 @@ printstatus(void)
|
||||||
sel, urg);
|
sel, urg);
|
||||||
printf("%s layout %s\n", m->wlr_output->name, m->lt[m->sellt]->symbol);
|
printf("%s layout %s\n", m->wlr_output->name, m->lt[m->sellt]->symbol);
|
||||||
}
|
}
|
||||||
fflush(stdout);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1943,6 +1942,9 @@ setsel(struct wl_listener *listener, void *data)
|
||||||
void
|
void
|
||||||
setup(void)
|
setup(void)
|
||||||
{
|
{
|
||||||
|
/* Force line-buffered stdout */
|
||||||
|
setvbuf(stdout, NULL, _IOLBF, 0);
|
||||||
|
|
||||||
/* The Wayland display is managed by libwayland. It handles accepting
|
/* The Wayland display is managed by libwayland. It handles accepting
|
||||||
* clients from the Unix socket, manging Wayland globals, and so on. */
|
* clients from the Unix socket, manging Wayland globals, and so on. */
|
||||||
dpy = wl_display_create();
|
dpy = wl_display_create();
|
||||||
|
|
Loading…
Reference in New Issue