#ifdef HAVE_XINERAMA
if (NILP (attributes_list))
{
- int xin_event_base, xin_error_base;
- bool xin_ok = false;
- xin_ok = XineramaQueryExtension (dpy, &xin_event_base, &xin_error_base);
- if (xin_ok && XineramaIsActive (dpy))
+ if (dpyinfo->xinerama_supported_p && XineramaIsActive (dpy))
attributes_list = x_get_monitor_attributes_xinerama (dpyinfo);
}
#endif /* HAVE_XINERAMA */
#include <X11/extensions/sync.h>
#endif
+#ifdef HAVE_XINERAMA
+#include <X11/extensions/Xinerama.h>
+#endif
+
/* Load sys/types.h if not already loaded.
In some systems loading it twice is suicidal. */
#ifndef makedev
dpyinfo->xsync_supported_p = false;
}
#endif
+
+#ifdef HAVE_XINERAMA
+ int xin_event_base, xin_error_base;
+ dpyinfo->xinerama_supported_p
+ = XineramaQueryExtension (dpy, &xin_event_base, &xin_error_base);
+#endif
+
/* See if a private colormap is requested. */
if (dpyinfo->visual == DefaultVisualOfScreen (dpyinfo->screen))
{