+ return wxNOT_FOUND;
+}
+
+wxDisplayImpl *wxDisplayFactoryX11::CreateDisplay(size_t n)
+{
+ ScreensInfo screens;
+
+ return n < screens.GetCount() ? new wxDisplayImplX11(n, screens[n]) : NULL;
+}
+
+// ============================================================================
+// wxDisplayImplX11 implementation
+// ============================================================================
+
+#ifdef HAVE_X11_EXTENSIONS_XF86VMODE_H
+
+//
+// See (http://www.xfree86.org/4.2.0/XF86VidModeDeleteModeLine.3.html) for more
+// info about xf86 video mode extensions
+//
+
+//free private data common to x (usually s3) servers
+#define wxClearXVM(vm) if(vm.privsize) XFree(vm.c_private)
+
+// Correct res rate from GLFW
+#define wxCRR2(v,dc) (int) (((1000.0f * (float) dc) /*PIXELS PER SECOND */) / ((float) v.htotal * v.vtotal /*PIXELS PER FRAME*/) + 0.5f)
+#define wxCRR(v) wxCRR2(v,v.dotclock)
+#define wxCVM2(v, dc) wxVideoMode(v.hdisplay, v.vdisplay, DefaultDepth((Display*)wxGetDisplay(), DefaultScreen((Display*)wxGetDisplay())), wxCRR2(v,dc))
+#define wxCVM(v) wxCVM2(v, v.dotclock)
+
+wxArrayVideoModes wxDisplayImplX11::GetModes(const wxVideoMode& mode) const
+{
+ //Convenience...
+ Display* pDisplay = (Display*) wxGetDisplay(); //default display
+ int nScreen = DefaultScreen(pDisplay); //default screen of (default) display...
+
+ //Some variables..
+ XF86VidModeModeInfo** ppXModes; //Enumerated Modes (Don't forget XFree() :))
+ int nNumModes; //Number of modes enumerated....
+
+ wxArrayVideoModes Modes; //modes to return...
+
+ if (XF86VidModeGetAllModeLines(pDisplay, nScreen, &nNumModes, &ppXModes) == TRUE)