ah, this is the way wx wants to work.

This commit is contained in:
David Rose 2012-01-14 19:47:28 +00:00
parent 1fd8a621ff
commit 09a9a5d8b3

View File

@ -268,7 +268,7 @@ else:
def __renderCallback(self, data):
cbType = data.getCallbackType()
if cbType == CallbackGraphicsWindow.RCTBeginFrame:
if not self.visible or not self.IsShownOnScreen():
if not self.visible:
data.setRenderFlag(False)
return
self.SetCurrent()
@ -279,6 +279,12 @@ else:
elif cbType == CallbackGraphicsWindow.RCTEndFlip:
self.SwapBuffers()
# Now that we've swapped, ask for a refresh, so we'll
# get another paint message if the window is still
# visible onscreen.
self.Refresh()
self.visible = False
data.upcall()
def onSize(self, event):
@ -302,7 +308,10 @@ else:
actually been manifested onscreen. (In X11, there appears
to be no way to know this otherwise.) """
self.visible = True
event.Skip()
# Important not to Skip this event, so the window
# subsystem believes we've drawn the window.
#event.Skip()
def onIdle(self, event):
size = None