#include <stdlib.h>
#include <stdio.h>
-#ifdef HAVE_COCOA
+#ifdef HAVE_JWXYZ
# include "jwxyz.h"
#else
# include <X11/Xlib.h>
if (!initted)
{
#ifdef HAVE_GTK2
+#if !GLIB_CHECK_VERSION(2, 36 ,0)
g_type_init ();
+#endif
#endif /* HAVE_GTK2 */
gdk_pixbuf_xlib_init (dpy, screen_number (xgwa.screen));
xlib_rgb_init (dpy, xgwa.screen);