diff --git a/sysdata/programs/horizon/src/main.hb b/sysdata/programs/horizon/src/main.hb index 37cad69b..198307fc 100644 --- a/sysdata/programs/horizon/src/main.hb +++ b/sysdata/programs/horizon/src/main.hb @@ -133,7 +133,12 @@ main := fn(): int { render.put_rect(screen, .(0, 0), .(screen.width - 1, screen.height - 1), render.white) // render mouse - render.put_rect(screen, .(mouse_x, mouse_y), .(20, 20), render.white) + lum := render.indexptr(screen, mouse_x, mouse_y) + if lum.r / 3 + lum.g / 3 + lum.b / 3 < 128 { + render.put_rect(screen, .(mouse_x, mouse_y), .(20, 20), render.white) + } else { + render.put_rect(screen, .(mouse_x, mouse_y), .(20, 20), render.black) + } // Send events to focused window }