~moody/drawterm

8db4d26aae50b2d50127fdea69123f40dcf939c8 — Jacob Moody 3 months ago 89a1108
wayland: ensure we grab the drawlock for writes to the frame buffer.
1 files changed, 5 insertions(+), 2 deletions(-)

M gui-wl/wl-screen.c
M gui-wl/wl-screen.c => gui-wl/wl-screen.c +5 -2
@@ 114,11 114,12 @@ wlattach(char *label)
	gscreen->r = r;
	rectclip(&(gscreen->clipr), gscreen->r);

	wldrawcursor(wl, &arrow);
	wl->runing = 1;
	kproc("wldispatch", dispatchproc, wl);
	terminit();
	qlock(&drawlock);
	wlflush(wl);
	qunlock(&drawlock);
	return wl;
}



@@ 169,7 170,9 @@ screensize(Rectangle r, ulong chan)
void
setcursor(void)
{
	wldrawcursor(snarfwin, &cursor);
	qlock(&drawlock);
	wldrawcursor(snarfwin, &arrow);
	qunlock(&drawlock);
}

void