]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/displayx11.cpp
Import numpy.oldnumeric
[wxWidgets.git] / src / unix / displayx11.cpp
index 53dba8c959e6f1ae9be6294a1fedb7b0a516e144..3f04ced7e5305913322e6a3dda5a74cbe813527b 100644 (file)
     #include "wx/string.h"
     #include "wx/utils.h"
     #include "wx/intl.h"
+    #include "wx/log.h"
 #endif /* WX_PRECOMP */
 
 #include "wx/display_impl.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.  */
@@ -265,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);
@@ -274,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);
@@ -288,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;