I'm having a problem with the events_pending function. When I call it,
the program hangs. The C-function gtk_events_pending() never returns.
Here's a small program to demonstrate this:
import gtk, GDK
def button_press(*args):
print 'button_press'
print gtk.events_pending()
print 'after pending'
def exit(widget):
gtk.mainquit()
def main():
window = gtk.GtkWindow()
window.connect('destroy', exit)
drawarea = gtk.GtkDrawingArea()
drawarea.connect('button_press_event', button_press)
drawarea.add_events(GDK.BUTTON_PRESS_MASK)
drawarea.show()
window.add(drawarea)
window.set_usize(100, 100)
window.show()
gtk.mainloop()
main()
If I click into the window, the only output I get is 'button_press'
after that I can't even close the window normally.
I tried this with pygtk 0.6.1, Python 1.5.1 and 1.5.2 (both with
threading enabled) on Linux.
--
Bernhard Herzog | Sketch, a python based drawing program
[EMAIL PROTECTED] | http://www.online.de/home/sketch/
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]