diff --git a/opengl/CyOpenGL.pyx b/opengl/CyOpenGL.pyx index f4f7da16..ef2fd8e3 100644 --- a/opengl/CyOpenGL.pyx +++ b/opengl/CyOpenGL.pyx @@ -88,9 +88,17 @@ class RawOpenGLWidget(Tk_.Widget, Tk_.Misc): Tk_.Widget.__init__(self, master, 'togl', cnf, kw) self.root = master - self.bind('', self.tkMap_expose_or_configure) + + # We do not have a valid framebuffer yet. + #self.bind('', self.tkMap_expose_or_configure) + #self.bind('', self.tkMap_expose_or_configure) + + # We have a valid framebuffer by the time we get the first + # event. + # Binding to draw will redraw every time the window + # becomes visible. In particular, it will cause the first draw. + self.bind('', self.tkMap_expose_or_configure) - self.bind('', self.tkMap_expose_or_configure) self.initialized = False