[gtk+] x11: Fill in event->any.window before calling filter functions
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] x11: Fill in event->any.window before calling filter functions
- Date: Tue, 1 Feb 2011 05:33:30 +0000 (UTC)
commit e67347a3c8c57f4bf507724d66a298ddc7799ea0
Author: Benjamin Otte <otte redhat com>
Date: Tue Feb 1 05:55:10 2011 +0100
x11: Fill in event->any.window before calling filter functions
a) We advertise it for GdkFilterFunc
b) It's necessary to differentiate between different event types with
multi-backend GTK.
gdk/x11/gdkeventsource.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c
index 892e686..ec18202 100644
--- a/gdk/x11/gdkeventsource.c
+++ b/gdk/x11/gdkeventsource.c
@@ -155,6 +155,10 @@ gdk_event_source_translate_event (GdkEventSource *event_source,
GdkFilterReturn result;
GdkWindow *filter_window;
+ filter_window = gdk_event_source_get_filter_window (event_source, xevent);
+ if (filter_window)
+ event->any.window = g_object_ref (filter_window);
+
/* Run default filters */
if (_gdk_default_filters)
{
@@ -171,15 +175,11 @@ gdk_event_source_translate_event (GdkEventSource *event_source,
return event;
}
- filter_window = gdk_event_source_get_filter_window (event_source, xevent);
-
if (filter_window)
{
/* Apply per-window filters */
GdkFilterReturn result;
- event->any.window = g_object_ref (filter_window);
-
if (filter_window->filters)
{
result = gdk_event_apply_filters (xevent, event,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]