From 9e75269627edfeeb7e95f8839d8fea65d5c8340c Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 17 Mar 2003 22:14:01 +0000 Subject: [PATCH] insert hack to open window immediately --- panda/src/chancfg/chancfg.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/panda/src/chancfg/chancfg.cxx b/panda/src/chancfg/chancfg.cxx index 0989d3c222..e01f6ac89b 100644 --- a/panda/src/chancfg/chancfg.cxx +++ b/panda/src/chancfg/chancfg.cxx @@ -516,6 +516,24 @@ ChanConfig::ChanConfig(GraphicsEngine *engine, GraphicsPipe* pipe, } } _graphics_window = win; + + // HACK ALERT! This lets a frame go by to open the window + // immediately, to work around some of the issues we are having + // with the new window code, as a stopgap until we can address + // this properly without stepping on people's toes with unwanted + // code changes. In the meantime, this could have unexpected + // consequences for non-Toontown clients that try to open multiple + // windows simultaneously. Beware! + engine->render_frame(); + + // HACK ALERT! If the window isn't open after the frame has gone + // by, assume it will not open, and clear it. + if (_graphics_window->is_closed()) { + chancfg_cat.error() << "Could not open window" << endl; + engine->remove_window(_graphics_window); + _graphics_window = (GraphicsWindow *)NULL; + } + return; }