shithub: drawterm

Download patch

ref: 0e7c030533fcbeeb07a2978883be5b4f7aaf7c37
parent: 94ba334d6dafc14c695e986afb33685e4e74d6eb
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Fri Feb 4 11:16:09 EST 2022

wayland: keep the same pointer surface, but mark it dirty to redraw properly

--- a/gui-wl/wl-util.c
+++ b/gui-wl/wl-util.c
@@ -130,10 +130,10 @@
 				buf[pos] = Black;
 		}
 	}
-	if(wl->cursorsurface != nil)
-		wl_surface_destroy(wl->cursorsurface);
-	wl->cursorsurface = wl_compositor_create_surface(wl->compositor);
+	if(wl->cursorsurface == nil)
+		wl->cursorsurface = wl_compositor_create_surface(wl->compositor);
 	wl_surface_attach(wl->cursorsurface, wl->cursorbuffer, 0, 0);
+	wl_surface_damage(wl->cursorsurface, 0, 0, 16, 16);
 	wl_surface_commit(wl->cursorsurface);
 	wl_pointer_set_cursor(wl->pointer, wl->pointerserial, wl->cursorsurface, -c->offset.x, -c->offset.y);
 }