This will make it easier to convert this project to Go/xgb later, even though the SYNC extension isn't currently supported there. So far unresolved: error handling.