use select() so we can wait for XEvents or our timer

poll for xevents using XPending

BUG=

Review URL: https://codereview.chromium.org/17275003

git-svn-id: http://skia.googlecode.com/svn/trunk@9633 2bbb7eff-a529-9590-31e7-b0007b416f81
3 files changed