Alex Holkner wrote: > Snor wrote: > > Using Win32 and latest pyglet revision here, I assumed that handling > > on_close myself for a window object meant that I could decide if the > > window actually closed or not - but this doesn't seem to be the case. > > In fact, no matter what I try there seems to be no way to make the > > window not close when the [x] is clicked. I've been fiddling with the > > WindowExitHandler and other code and came up with nothing - is this > > supposed to be how it behaves or am I missing something? > > > The default on_close() handler sets `has_exit` to True on the window. > In all the examples given, the main runloop checks for this flag to > determine when to exit. In your on_close() handler, return True to > shortcut the default handler (alternatively, ignore the has_exit flag). > > Alex.
I am ignoring has_exit and it doesn't seem to make any difference what my on_close() handler returns. When the [x] is clicked, the window closes but my application keeps running because I am using a different program loop. I just don't understand why the window itself closes - could you tell me perhaps where the code that makes a window close (or stay open?) is, so I can try and figure out what is going on? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
