// check version before any other operations
Request request = new Request (display, major_opcode, 0, 3);
request.write4 (CLIENT_MAJOR_VERSION);
request.write4 (CLIENT_MINOR_VERSION);
Data reply = display.read_reply (request);
server_major_version = reply.read4 (8);
server_minor_version = reply.read4 (12);
}