I found out what was causing the problems. I was expecting window.dispatch_events() to fire the resize event. However the app event loop never calls this. In the Win32 window implementation the on_resize event is dispatched directly when it gets the event from the OS.
Currently I think the best way to fix this, is to send the on_resize event from the place where it comes in (and sets the needs_resize variable). That would be in the ConfigureNotify handler. That makes it similar to other implementations. Does anybody know why the dispatch_events() method is never called from the app event loops? The documentation shows a custom event loop should do that. It seems like some refactoring in progress. @Oktay: When the resize event was received, the game still showed some garbage around the picture. Is that still work in progress? Rob Op maandag 16 februari 2015 23:34:34 UTC+1 schreef Oktay Acikalin: > > Sure. I've created a package here: > https://drive.google.com/open?id=0B8GQnTRW-JUbdUZvZDFoNGx0cE0&authuser=0 > It's still in the transition from pygame to pyglet but most of it is > working again. I've also stripped some repo data. > The main executable is joedng.py. > In diamond/thirdparty you can find the current and old pyglet versions. > There I left the repo data intact so that you can compare the states a bit > easier. > > Cheers, > Oktay. > > Rob van der Most <[email protected] <javascript:>> schrieb am Mon Feb > 16 2015 at 22:29:24: > > Hmmz. There is something weird about it. Need to investigate. Can I try >> your code? >> >> Rob >> On 16 Feb 2015 22:27, "Oktay Acikalin" <[email protected] >> <javascript:>> wrote: >> >>> Hi Rob, >>> >>> I had to restore the window resize code in that same method, too. >>> Without that my game wouldn't see when a user resizes the window (e.g. >>> maximize). Would you mind putting it back or do you have a better idea? >>> >>> Cheers, >>> Oktay. >>> >>> >>> Alessandro Re <[email protected] <javascript:>> schrieb am Mon Feb 16 >>> 2015 at 18:37:41: >>> >>>> On Monday, February 16, 2015 at 4:27:17 PM UTC, Rob wrote: >>>>> >>>>> I submitted a fix to the 1.2 maintenance branch. I will probably >>>>> release fix release by the end of the week. >>>>> >>>>> Rob >>>>> >>>> >>>> >>>> Hi Rob, >>>> thanks for your quick intervention. For what I'm concerned, your patch >>>> works perfectly (also on the issue I had on cocos2d). >>>> >>>> @Oktay, I noticed that with your patch, there are some issues when >>>> *not* animating. Rob patch solved, for me at least. >>>> Thanks again to everyone! >>>> ~Ale >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "pyglet-users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected] <javascript:>. >>>> To post to this group, send email to [email protected] >>>> <javascript:>. >>>> Visit this group at http://groups.google.com/group/pyglet-users. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "pyglet-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected] <javascript:>. >>> To post to this group, send email to [email protected] >>> <javascript:>. >>> Visit this group at http://groups.google.com/group/pyglet-users. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "pyglet-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/pyglet-users. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.
