autox: Fix race condition and add get_screen_size().

python-xlib reuses IDs for subsequent windows, which
is very handy for finding buggy code. :-(  When we create
a new window, there may be an in-flight DestroyNotify
event about a previous window sharing its ID.  Sync before
creating the new window to make sure that we don't
misinterpret which window the event is about.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/1386002
1 file changed