Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Don't terminate on close: (2 Items)
   
Don't terminate on close  
I have a thread that handle all photon stuff, with its own mainloop (PtMainLoop()).

When the windows is close, the whole application terminated.  I just want PtMainLoop() to return.  I couldn't find 
anything in the documentation how to handle this scenario, although I can remember reading about this a while ago .  
Sorry for asking about something that is probably documented but doing search with the keywords, exit, termination, 
close is generating lots of noise ;-)
Re: Don't terminate on close  
Check out the PtQuitMainLoop().
You will need to have a window manager callback handler too. See the attached sample -- it doesn't use PtQuitMainLoop() 
(because it is not multithreaded) but show how to just unrealize a window without exiting. The key is disabling the 
Ph_WM_CLOSE flag in the Pt_ARG_WINDOW_MANAGED_FLAGS of your window.
Attachment: Text close_ab.tgz 5.83 KB