fix input lag for buggy linux driver, fix headless mode for jdk1.6 on linux