Use the Xlib API to take window screenshots