Works fine here.  What window manager are you using?  I'm on
sawmill 0.20.

Delete should gracefully shut down everything.  When I do Destroy,
you'll get the normal

Gdk-WARNING **: GdkWindow 0x7400004 unexpectedly destroyed

message.

Matt

On Tue, Jan 11, 2000 at 12:46:20PM -0800, Randolph Bentson wrote:
> 
> When I run the attached code and use my window manager to
> "delete" the window, the code works as desired. But I get
> core dumps when I "destroy" the window.
> 
> When I run the code under the fvwm window manager,
> the error messages are:
>     Gdk-ERROR **: an x io error occurred
>     aborting...
>     Abort (core dumped)
> 
> At first I thought I failed to include some essential element
> in my code, but just before sending the first draft of this
> note, I tried to "destroy" windows in example code in the pygtk
> distribution.  Those programs exhibit the same basic failure mode.
> 
> I'm running version 1.5 of python, version 1.2 of libgtk,
> version 1.2.1 of gtk+, and version 0.63 of pygtk.  I'd be
> most happy with answers which point me to some new release
> which solves the problem.  My second choice would be advise
> on how to make this code more robst.  Any takers?
> 
> Randolph Bentson
> 
> 
> #!/usr/bin/python
> import gtk
> # using 'from gtk import *' only causes a simple
> # change to the code below, the problem remains
> 
> try:
>     win = gtk.GtkWindow()
>     win.connect("delete_event", gtk.mainquit)
>     win.connect("destroy", gtk.mainquit)
>     win.show()
>     gtk.mainloop()
> except:
>     import sys
>     print 'error!', sys.exc_type, sys.exc_value
> 
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to