On Tue, 2016-05-10 at 16:54 +0000, George Wu wrote: > dpy = XtDisplay(draw); > win = XtWindow(draw); win is 0 here, which isn't a valid ID, so... > sfc = cairo_xlib_surface_create(dpy, win, DefaultVisual(dpy, scrnum), > Width, Height); ... this creates an invalid surface. Now, why win is zero, I couldn't say. - ajax