chiark / gitweb /
Make --screenshot work even in (Cairo) GTK2 builds.
authorSimon Tatham <anakin@pobox.com>
Wed, 13 Nov 2019 19:23:07 +0000 (19:23 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 13 Nov 2019 19:27:58 +0000 (19:27 +0000)
commit1c0c49dd5cd8df6ae87f7be5371be84589fa2662
tree77bf82eb16e0a2f94f8198680b8de451ba27ef88
parent26a40781e6a3d64a32f8f98529b62917dd32d389
Make --screenshot work even in (Cairo) GTK2 builds.

I had occasion recently to want to take a puzzle screenshot on a
machine that didn't have the GTK3 libraries installed, but is advanced
enough to build the GTK2+Cairo version of the puzzles. That _ought_ to
be good enough to take screenshots using bare Cairo without GTK; I
think the only reason why I didn't bother to support it before is
because on GTK2, frontend_default_colours() queries the widget style
to choose a shade of grey. But we have a fixed fallback shade of grey
to use on GTK3, so it's easy to just use that same fallback in
headless GTK2.
gtk.c