I am trying to create a simple program to save a screenshot on X11 following this guide. I know there is plenty of error checking / memory management stuff missing here; I a