X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad9835c97c10c0d7de345e3a7a7c0fc2776eb2cb..8f62e63351ffcecfba044d5859d1ef2c14114278:/src/unix/displayx11.cpp diff --git a/src/unix/displayx11.cpp b/src/unix/displayx11.cpp index b42d4462a0..3f04ced7e5 100644 --- a/src/unix/displayx11.cpp +++ b/src/unix/displayx11.cpp @@ -26,17 +26,18 @@ #if wxUSE_DISPLAY +#include "wx/display.h" + #ifndef WX_PRECOMP #include "wx/dynarray.h" #include "wx/gdicmn.h" #include "wx/string.h" #include "wx/utils.h" + #include "wx/intl.h" + #include "wx/log.h" #endif /* WX_PRECOMP */ -#include "wx/display.h" #include "wx/display_impl.h" -#include "wx/intl.h" -#include "wx/log.h" /* These must be included after the wx files. Otherwise the Data macro in * Xlibint.h conflicts with a function declaration in wx/list.h. */ @@ -264,7 +265,7 @@ bool wxDisplayImplX11::ChangeMode(const wxVideoMode& mode) #else // !HAVE_X11_EXTENSIONS_XF86VMODE_H -wxArrayVideoModes wxDisplayImplX11::GetModes(const wxVideoMode& mode) const +wxArrayVideoModes wxDisplayImplX11::GetModes(const wxVideoMode& modeMatch) const { int count_return; int* depths = XListDepths((Display*)wxGetDisplay(), 0, &count_return); @@ -273,7 +274,11 @@ wxArrayVideoModes wxDisplayImplX11::GetModes(const wxVideoMode& mode) const { for ( int x = 0; x < count_return; ++x ) { - modes.Add(wxVideoMode(m_rect.GetWidth(), m_rect.GetHeight(), depths[x])); + wxVideoMode mode(m_rect.GetWidth(), m_rect.GetHeight(), depths[x]); + if ( mode.Matches(modeMatch) ) + { + modes.Add(modeMatch); + } } XFree(depths); @@ -287,7 +292,7 @@ wxVideoMode wxDisplayImplX11::GetCurrentMode() const return wxVideoMode(); } -bool wxDisplayImplX11::ChangeMode(const wxVideoMode& mode) +bool wxDisplayImplX11::ChangeMode(const wxVideoMode& WXUNUSED(mode)) { // Not implemented return false;