From 86d6eeefaffbc2ac961c862f5c96e372b4d1fbc7 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 21 Feb 2007 21:23:50 +0000 Subject: [PATCH] allow want-direct to work with window-type none --- direct/src/showbase/ShowBase.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index ac79203e7b..bc78a69d17 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -307,13 +307,6 @@ class ShowBase(DirectObject.DirectObject): # This needs to be allocated even if the viewer is off. self.bufferViewer = BufferViewer() - # Start Tk and DIRECT if specified by Config.prc - fTk = self.config.GetBool('want-tk', 0) - # Start DIRECT if specified in Config.prc or in cluster mode - fDirect = (self.config.GetBool('want-directtools', 0) or - (base.config.GetString("cluster-mode", '') != '')) - # Set fWantTk to 0 to avoid starting Tk with this call - self.startDirect(fWantDirect = fDirect, fWantTk = fTk) # Start IGLOOP self.restart() @@ -582,6 +575,14 @@ class ShowBase(DirectObject.DirectObject): # error not to open a window. raise StandardError, 'Could not open window.' + # Start Tk and DIRECT if specified by Config.prc + fTk = self.config.GetBool('want-tk', 0) + # Start DIRECT if specified in Config.prc or in cluster mode + fDirect = (self.config.GetBool('want-directtools', 0) or + (base.config.GetString("cluster-mode", '') != '')) + # Set fWantTk to 0 to avoid starting Tk with this call + self.startDirect(fWantDirect = fDirect, fWantTk = fTk) + return self.win != None def isMainWindowOpen(self):