Close window

Hi ,
I need to make some things before the windows close.
I’l look into the API and find the setCloseRequestEvent() but don’t seems to work.
I can’t find anything about it on the manual or forum.
Is anybody got a way to catch the closing event ?
Thanks.

when the window close, it still send a ‘window-event’ that you can catch.

see:http://panda3d.org/manual/index.php/Event_Handling_and_Messenger_Utilities
and http://panda3d.org/manual/index.php/Event_Handlers

just check if win.isClosed()

ok thanks.