~ruther/dwl

deb48ff48b186ff77a7e9d3b3ab724ff4c3c340f — Dima Krasner 2 years ago c70db2d
force line-buffered stdout if stdout is not a tty
1 files changed, 3 insertions(+), 1 deletions(-)

M dwl.c
M dwl.c => dwl.c +3 -1
@@ 1674,7 1674,6 @@ printstatus(void)
				sel, urg);
		printf("%s layout %s\n", m->wlr_output->name, m->lt[m->sellt]->symbol);
	}
	fflush(stdout);
}

void


@@ 1943,6 1942,9 @@ setsel(struct wl_listener *listener, void *data)
void
setup(void)
{
	/* Force line-buffered stdout */
	setvbuf(stdout, NULL, _IOLBF, 0);

	/* The Wayland display is managed by libwayland. It handles accepting
	 * clients from the Unix socket, manging Wayland globals, and so on. */
	dpy = wl_display_create();

Do not follow this link