From 95708adfaddf5ee40d4c579eefdfcdd877550ed1 Mon Sep 17 00:00:00 2001 From: probonopd Date: Sat, 12 Aug 2017 01:16:18 +0200 Subject: [PATCH] Update worker.sh --- code/worker.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/worker.sh b/code/worker.sh index d1c93529..ae680f51 100644 --- a/code/worker.sh +++ b/code/worker.sh @@ -150,12 +150,15 @@ if [ "$TERMINAL" == "false" ] ; then if [ "$INPUTBASENAME" == "Subsurface" ] ; then xdotool sleep 0.1 key Escape # Click away the update check window sleep 1 + # Get a list of open windows + xwininfo -tree -root | grep 0x | grep '": ("' | sed -e 's/^[[:space:]]*//' fi # Works with Xvfb # sudo apt-get -y install x11-apps netpbm xdotool # We do this in .travis.yml # -display :99 needed here? - xwd -id $(xdotool getactivewindow) -silent | xwdtopnm | pnmtojpeg > database/$INPUTBASENAME/screenshot.jpg && echo "Snap!" + # xwd -id $(xdotool getactivewindow) -silent | xwdtopnm | pnmtojpeg > database/$INPUTBASENAME/screenshot.jpg && echo "Snap!" + xwd -id $(xwininfo -tree -root | grep 0x | grep '": ("' | sed -e 's/^[[:space:]]*//' | head -n 1 | cut -d " " -f 1) -silent | xwdtopnm | pnmtojpeg > database/$INPUTBASENAME/screenshot.jpg && echo "Snap!" else echo "TODO: Make a screenshot of a terminal application (fbgrab/fbdump; try running AppImage with -h and observe exit status)"