X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/428b6942f2cce6bfeadf0882ad7fd28952b3e5f1..d3e780ecdf69233c872d51216eedbc64a1b6db25:/src/unix/displayx11.cpp?ds=sidebyside diff --git a/src/unix/displayx11.cpp b/src/unix/displayx11.cpp index c19c2c2f60..08cf56f9f0 100644 --- a/src/unix/displayx11.cpp +++ b/src/unix/displayx11.cpp @@ -39,7 +39,9 @@ extern "C" { #include #include #include +#ifdef HAVE_X11_EXTENSIONS_XF86VMODE_H #include +#endif } class wxDisplayUnixPriv @@ -117,6 +119,7 @@ wxDisplay::wxDisplay(size_t index) : wxDisplayBase ( index ), m_priv( new wxDisp XineramaScreenInfo *screenarr; int numscreens; screenarr = XineramaQueryScreens(disp, &numscreens); + m_priv->m_rect = wxRect(screenarr[index].x_org, screenarr[index].y_org, screenarr[index].width, screenarr[index].height); m_priv->m_depth = DefaultDepth(disp, DefaultScreen(disp)); @@ -150,6 +153,9 @@ wxString wxDisplay::GetName() const return wxEmptyString; } + +#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 @@ -257,8 +263,13 @@ bool wxDisplay::ChangeMode(const wxVideoMode& mode) return false; } } - /* - //Brian Victor's patch (X11 can't change bit depth yet), here for reference +} + + +#else // !HAVE_X11_EXTENSIONS_XF86VMODE_H + +wxArrayVideoModes wxDisplay::GetModes(const wxVideoMode& mode) const +{ Display *disp = (Display*)wxGetDisplay(); int count_return; int* depths = XListDepths(disp, 0, &count_return); @@ -272,8 +283,20 @@ bool wxDisplay::ChangeMode(const wxVideoMode& mode) } } return modes; - */ } -#endif /* wxUSE_DISPLAY */ +wxVideoMode wxDisplay::GetCurrentMode() const +{ + // Not implemented + return wxVideoMode(); +} + +bool wxDisplay::ChangeMode(const wxVideoMode& mode) +{ + // Not implemented + return false; +} +#endif // !HAVE_X11_EXTENSIONS_XF86VMODE_H + +#endif /* wxUSE_DISPLAY */