I spent way too long wrestling C in getting this to work: https://github.com/robbieh/xscreensaver-pidgrid
Which has me looking for alternatives again. I stumbled across https://github.com/danwerner/cairotrix which uses GTK and Cairo.
I wondering if I can coerce Cairo into drawing on a given window ID