diff options
| author | Simon Tatham <anakin@pobox.com> | 2006-12-27 15:21:55 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2006-12-27 15:21:55 +0000 |
| commit | 197c2ebc122d9dc30036deb96f3bf098dac40615 (patch) | |
| tree | 7520630b85670f5524fd8ccc38f75b81e37ddca1 /icons | |
| parent | 61b983ae3a8b1dc9033f7ef843a4a17228a8f311 (diff) | |
| download | puzzles-197c2ebc122d9dc30036deb96f3bf098dac40615.zip puzzles-197c2ebc122d9dc30036deb96f3bf098dac40615.tar.gz puzzles-197c2ebc122d9dc30036deb96f3bf098dac40615.tar.bz2 puzzles-197c2ebc122d9dc30036deb96f3bf098dac40615.tar.xz | |
Aha, this seems to be a more sensible way of getting screenshots:
instead of having the puzzle binary export its window ID to a script
which then runs xwd, we can use the gdk-pixbuf library to have the
puzzle binary _itself_ read its own internal pixmap and save it
straight to a PNG. How handy. And faster, and less timing-sensitive.
[originally from svn r7022]
Diffstat (limited to 'icons')
| -rwxr-xr-x | icons/screenshot.sh | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/icons/screenshot.sh b/icons/screenshot.sh index cb856be..0e2a06e 100755 --- a/icons/screenshot.sh +++ b/icons/screenshot.sh @@ -22,13 +22,4 @@ else redo= fi -"$binary" $redo --windowid --load "$save" 2>/dev/null | { - read windowid - # I'm not sure why I have to do this sleep, since gtk.c does - # carefully redraw the window _before_ outputting the window ID, - # but nonetheless this script doesn't seem to be reliable without - # it :-/ - sleep 1 - xwd -silent -id $windowid | convert xwd:- "$image" - xkill -id $windowid >/dev/null -} +"$binary" $redo --screenshot "$image" --load "$save" |