[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: app_exit in toolbox_destroy



On Sat, 05 Jul 2003, Krzysztof Foltman wrote:
> What's the purpose of calling app_exit in toolbox_destroy ?
> 
> If toolbox_delete (delete event) can be compared to win32 WM_CLOSE,
> and toolbox_destroy (destroy event) to WM_DESTROY, then app_exit will
> be called twice without a good reason.
> 
> Can it be just removed ? Is there any situation where destroy is
> called and app_exit is not (neither from toolbox_delete nor from
> explicit window delete) ?

I think the sematnics for WM_CLOSE/WM_DESTROY is slightly different from
the GTK events delete and destroy.  Delete is when the window is being
asked nicely to close.  It should then remove itself and clean up, but that
shouldn't call destroy.  Destroy is when X kills the window and frees up the
resources, and then tells the application "I just killed your window.  You
may want to know that your pointer is now invalid and any data stored in
the window is gone."  Some window managers do it that way.

However, gtk_main_quit removes the window, and destroy is then called.  So
now I'm removing the destroy handler before calling app_exit() in
toolbox_delete(), and that fixes the double exit, as far as I can see.  We
still have some strange floating object messages at exit, though.

-Lars

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| HĂ„rdgrim of Numenor
"I do not agree with a word that you say, but I   |----------------------------
will defend to the death your right to say it."   | Where are we going, and
    --Evelyn Beatrice Hall paraphrasing Voltaire  | what's with the handbasket?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK