From 5fb99fe76f36c95ff4517856d2b5ff24c7d9aecd Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 18 Sep 2002 20:39:08 +0000 Subject: [PATCH] Allow the developer to choose if SetUseBestVisual is called git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_extras.py | 6 +++++- wxPython/src/helpers.cpp | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wxPython/src/_extras.py b/wxPython/src/_extras.py index 0e72a395d9..b2fb86c8bd 100644 --- a/wxPython/src/_extras.py +++ b/wxPython/src/_extras.py @@ -765,10 +765,14 @@ class wxApp(wxPyApp): error = 'wxApp.error' outputWindowClass = wxPyOnDemandOutputWindow - def __init__(self, redirect=_defRedirect, filename=None): + def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=true): wxPyApp.__init__(self) self.stdioWin = None self.saveStdio = (sys.stdout, sys.stderr) + + # This has to be done before OnInit + self.SetUseBestVisual(useBestVisual) + if redirect: self.RedirectStdio(filename) # this initializes wxWindows and then calls our OnInit diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index a88ea2ae68..74b75a67bf 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -92,7 +92,6 @@ BOOL WINAPI DllMain( wxPyApp::wxPyApp() { - SetUseBestVisual(TRUE); } wxPyApp::~wxPyApp() {