This example uses two Xlib routines XOpenDisplay() and XCreateSimpleWindow() to connect to the X server and then to create a window. Then it calls
XMapWindow() to make the window visible on the screen. What is important here is that until XFlush() is called the previous requests do not arrive to the server.