~moody/drawterm

ad8d58f9bf5ea4cd25b01299156bdfe5763e1edd — Jacob Moody 3 months ago fe081c0
Provide cursor hot spot to wayland
3 files changed, 3 insertions(+), 3 deletions(-)

M gui-wl/wl-cb.c
M gui-wl/wl-screen.c
M gui-wl/wl-util.c
M gui-wl/wl-cb.c => gui-wl/wl-cb.c +1 -1
@@ 303,7 303,7 @@ pointer_handle_enter(void *data, struct wl_pointer *wl_pointer, uint32_t serial,
	wl->pointerserial = serial;
	if(wl->cursorsurface == nil)
		return;
	wl_pointer_set_cursor(wl->pointer, wl->pointerserial, wl->cursorsurface, 0, 0);
	wl_pointer_set_cursor(wl->pointer, wl->pointerserial, wl->cursorsurface, -cursor.offset.x, -cursor.offset.y);
}

static void

M gui-wl/wl-screen.c => gui-wl/wl-screen.c +1 -1
@@ 171,7 171,7 @@ void
setcursor(void)
{
	qlock(&drawlock);
	wldrawcursor(snarfwin, &arrow);
	wldrawcursor(snarfwin, &cursor);
	qunlock(&drawlock);
}


M gui-wl/wl-util.c => gui-wl/wl-util.c +1 -1
@@ 149,5 149,5 @@ wldrawcursor(Wlwin *wl, Cursorinfo *c)
	wl->cursorsurface = wl_compositor_create_surface(wl->compositor);
	wl_surface_attach(wl->cursorsurface, wl->cursorbuffer, 0, 0);
	wl_surface_commit(wl->cursorsurface);
	wl_pointer_set_cursor(wl->pointer, wl->pointerserial, wl->cursorsurface, 0, 0);
	wl_pointer_set_cursor(wl->pointer, wl->pointerserial, wl->cursorsurface, -c->offset.x, -c->offset.y);
}