GNOME Bugzilla – Bug 346280
No way to call gdk_window_add_filter(NULL, ...)
Last modified: 2018-08-17 13:43:25 UTC
gdk.Window has a method named add_filter() which wraps gdk_window_add_filter(). but gtk_window_add_filter() can also be called with its first argument NULL. Writing gdk_window_add_filter(NULL, somefunc, NULL) will set it up so that somefunc listens to all GDK events to all windows. You can't do that with pygtk. I suggest a utility function: gdk.window_add_filter_all_windows(function, data=None) which wraps gdk_window_add_filter(NULL, function, data).
*** Bug 512851 has been marked as a duplicate of this bug. ***
pygtk is not under active development anymore and had its last code changes in 2013. Its codebase has been archived: https://gitlab.gnome.org/Archive/pygtk/commits/master PyGObject at https://gitlab.gnome.org/GNOME/pygobject is its successor. See https://pygobject.readthedocs.io/en/latest/guide/porting.html for porting info. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Feel free to open a task in GNOME Gitlab if the issue described in this task still applies to a recent version of PyGObject. Thanks!