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

On Wed, 24 Dec 1997, Francois JEANMOUGIN wrote:

> > so we can get a full stack trace and understand your problem.
> 	I have to second Mr INTERLOG (or is it ACCOUNT?)
> 	Not sure, but I think it's a mistake in the tutorial. If you try the
> first hello-world in the tutorial I have, you will find this (I think you know
> the full code ;-):
> void destroy (GtkWidget *widget, gpointer *data)
> {
>     gtk_main_quit ();
> }
> int main (int argc, char *argv[])
> {
> [...]
> gtk_signal_connect (GTK_OBJECT (window), "destroy";,
>                         GTK_SIGNAL_FUNC (destroy), NULL);
> [...]
> }
> 	So, this, if I call the destroy from Afterstep (middle button on tiotle
> bar, then select destroy), makes :
> chouchen:~/test-gtk$ hello

ok, listen:
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!

> 					Happy Xmas ;-).
> 							Francois.
> P.S.: if this helps :
> chouchen:~/test-gtk$ uname -a
> Linux chouchen 2.0.32 #3 Tue Nov 25 12:52:49 MET 1997 i586
> and gtk+-971201

Merry x-mas!


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