GNOME Bugzilla – Bug 512851
gtk.gdk.Window.add_filter cannot apply to all windows
Last modified: 2008-01-29 17:50:51 UTC
In the C API, gdk_window_add_filter() allows you to pass NULL as the window parameter in order to receive *all* events for *all* windows. There is apparently no way to do this in pygtk. The obvious solution: #!/usr/bin/python import gtk def frogs(event): print 'I have frogs!' gtk.gdk.Window.add_filter(None, frogs) gtk.main() produces: gtk.gdk.Window.add_filter(None, frogs) TypeError: descriptor 'add_filter' requires a 'gtk.gdk.Window' object but received a 'NoneType'
*** This bug has been marked as a duplicate of 346280 ***