]> Pileus Git - ~andy/gtk/commit
Make gdk_event_apply_filters safe against changes in filter list
authorWilliam Jon McCann <jmccann@redhat.com>
Sat, 20 Nov 2010 22:58:50 +0000 (17:58 -0500)
committerWilliam Jon McCann <jmccann@redhat.com>
Mon, 22 Nov 2010 18:16:24 +0000 (13:16 -0500)
commit323df2b2800383832ed3c2e43626f2c6821c33ec
treecf9f28ef6f54e081e545dd9972ea781ea751fe60
parentabe20a7c9788bd262508e13e987f4ffd6586ea69
Make gdk_event_apply_filters safe against changes in filter list

An event filter may add or remove filters itself.  This patch does
two things to address this case.  The first is to take a temporary
reference to the filter while it is being used.  The second is
to wait until after the filter function is run before determining
the next node in the list to process.  This guards against
changes to the next node.  It also does not run functions
that have been marked as removed.  Though I'm not sure if this
case can arise.

https://bugzilla.gnome.org/show_bug.cgi?id=635380
gdk/gdkinternals.h
gdk/gdkwindow.c
gdk/quartz/gdkevents-quartz.c
gdk/win32/gdkevents-win32.c
gdk/x11/gdkeventsource.c