use XNextEvent instead of XCheckWindowEvent
formating
gitignore