XDamageQueryVersion calls UnlockDisplay and SyncHandle, without a matching
LockDisplay. This triggers an assertion in Xlib/XCB designed to catch these
kinds of bugs. Remove the two calls, which fixes the assertion.
Thanks to Mike Auty <mike.auty@gmail.com> for the report.