#!/bin/sh

TITLE=xdotool_test_window_$$

try () {
  "$@" > /dev/null 2>&1

  if [ $? -ne 0 ]; then
    echo "FAILURE: $@"
    return 1
  else
    echo "SUCCESS: $@"
    return 0
  fi
}

mkwindow () {
  xterm -T "$TITLE" -e 'sleep 300' &
  windowpid="$!"
}
