And functions for XCB event handlers.