Re: [gtk-list] Re: Killing Widgets: simple source



On Dec 24,  3:06pm, Tim Janik wrote:

> ok, listen:

	yep masterrrrr ;-).

> there is more than one way to end an application.
> the Xserver can send a window a "delete_event" to which the window can
> react in two ways: it destroyes itself, or it remains.
> now, the window manager offers you anopther way to "finish" an application,
> that is the "destroy" choice in the afterstep window operation menu. in this
> case, the Xserver will cut off the x connection to the client, there is no
> chance for the client to keep it's connection, and usually the client dies
> with an x error.
> you can produce this kind of x-error with any kind of application, xterm, xv
> or what-the-heck.
>
>
> now if you want your programs to finish correctly, don't kill em -9 and don't
> cut off their conections!

	Yep, I understood it like that (in fact, xterm complains about "broken
pipe" in the same case), so that's what a teacher like me call a "mistake in
the tutorial". I think that using "destroy" is not very good, and this question
will be back soon...

	So, just call it a quit() or destroy_widget() function. Also, I was
confused because what you call the "destroy" signal is not written "destroy" in
most of the wm I use but "close".

	No problem for me, in any case, I keep a quit button, but two short
lines in the tutorial about what "destroy" means in Gtk would be helpfull.
Probably Mr ACCOUNT ;-) made the same mistake as me.


	Thanks for your patience and explanations. I'm a beginner in X
programming, and you can through me back to the basicals of X each time the
question is not Gtk specific.

	Well, what is the next callback after merry Xmas?

	Oh yeah, Happy New Year (I will be back in beginning of januar...).

							Thanks,
								Francois.

-- 
Francois Jeanmougin     | groupe de bioinformatique / bioinformatics groupe
tel:(+33) 3 88 65 32 71 | IGBMC BP 163 67404 Illkirch France
e-mail: jeanmougin@igbmc.u-strasbg.fr
"Ce sont des desespoirs d'intellectuels ennuyes, ou des ennuis 
d'intellectuels desesperes, comme vous voulez, comme vous voulez" M. Benin



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