Xcowsay is starting to show it’s age a bit, and with Gtk2 and legacy GDK fast disappearing from distributions it’s time to upgrade to Gtk3! (Yes I know Gtk4 is out soon…)
Migrating from GDK to Cairo was fairly painless as the drawing API is very similar. The main problem is the removal of the
gtk_widget_shape_combine_mask function that xcowsay used to make the background of the cow and the bubble transparent. This took the 2D bitmask and cut an arbitrary hole in the window. In Gtk3 we instead have to use the window’s alpha channel to make portions transparent. The big drawback of this is that it requires a compositing X11 window manager or Wayland or it won’t work at all. If this affects you then you can just use 1.4 as there’s no functional difference. A side effect of this change is that the edge of the speech bubble is now anti-aliased, fixing a long-standing complaint.
The source zip is here: xcowsay-1.5.tar.gz.