1// This is here just for reference. It is not required for this example.
 2
 3#include <X11/Xlib.h>
 4#include <unistd.h>
 5
 6int main() {
 7    Display *MainDisplay = XOpenDisplay(0);
 8    Window RootWindow = XDefaultRootWindow(MainDisplay);
 9
10    Window MainWindow = XCreateSimpleWindow(MainDisplay, RootWindow, 0, 0, 800, 600, 0, 0, 0xFF0000);
11    XMapWindow(MainDisplay, MainWindow);
12    XFlush(MainDisplay);
13
14    for (;;) {
15        sleep(1);
16    }
17}