summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.pre-2-107
-rw-r--r--ChangeLog.pre-2-27
-rw-r--r--ChangeLog.pre-2-47
-rw-r--r--ChangeLog.pre-2-67
-rw-r--r--ChangeLog.pre-2-87
-rw-r--r--gdk/x11/gdkevents-x11.c32
7 files changed, 67 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 8f98ebf0fd..02cc399e11 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Dec 19 11:42:00 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
+ the filters on the window where the event is received,
+ not on the window the event is "about". (#101512,
+ Bolian Yin.)
+
Thu Dec 19 03:58:36 2002 Kristian Rietveld <kris@gtk.org>
* tests/testtreeflow.c: the rand variable should be static to
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 8f98ebf0fd..02cc399e11 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,10 @@
+Thu Dec 19 11:42:00 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
+ the filters on the window where the event is received,
+ not on the window the event is "about". (#101512,
+ Bolian Yin.)
+
Thu Dec 19 03:58:36 2002 Kristian Rietveld <kris@gtk.org>
* tests/testtreeflow.c: the rand variable should be static to
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 8f98ebf0fd..02cc399e11 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,10 @@
+Thu Dec 19 11:42:00 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
+ the filters on the window where the event is received,
+ not on the window the event is "about". (#101512,
+ Bolian Yin.)
+
Thu Dec 19 03:58:36 2002 Kristian Rietveld <kris@gtk.org>
* tests/testtreeflow.c: the rand variable should be static to
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 8f98ebf0fd..02cc399e11 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,10 @@
+Thu Dec 19 11:42:00 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
+ the filters on the window where the event is received,
+ not on the window the event is "about". (#101512,
+ Bolian Yin.)
+
Thu Dec 19 03:58:36 2002 Kristian Rietveld <kris@gtk.org>
* tests/testtreeflow.c: the rand variable should be static to
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 8f98ebf0fd..02cc399e11 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,10 @@
+Thu Dec 19 11:42:00 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
+ the filters on the window where the event is received,
+ not on the window the event is "about". (#101512,
+ Bolian Yin.)
+
Thu Dec 19 03:58:36 2002 Kristian Rietveld <kris@gtk.org>
* tests/testtreeflow.c: the rand variable should be static to
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 8f98ebf0fd..02cc399e11 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,10 @@
+Thu Dec 19 11:42:00 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
+ the filters on the window where the event is received,
+ not on the window the event is "about". (#101512,
+ Bolian Yin.)
+
Thu Dec 19 03:58:36 2002 Kristian Rietveld <kris@gtk.org>
* tests/testtreeflow.c: the rand variable should be static to
diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c
index f0e44e8b06..e32fe2182b 100644
--- a/gdk/x11/gdkevents-x11.c
+++ b/gdk/x11/gdkevents-x11.c
@@ -688,6 +688,7 @@ gdk_event_translate (GdkDisplay *display,
GdkWindow *window;
GdkWindowObject *window_private;
+ GdkWindow *filter_window;
GdkWindowImplX11 *window_impl = NULL;
gint return_val;
gint xoffset, yoffset;
@@ -742,6 +743,14 @@ gdk_event_translate (GdkDisplay *display,
window = gdk_window_lookup_for_display (display, xwindow);
window_private = (GdkWindowObject *) window;
+ /* We always run the filters for the window where the event
+ * is delivered, not the window that it relates to
+ */
+ if (xevent->xany.window == xwindow)
+ filter_window = window;
+ else
+ filter_window = gdk_window_lookup_for_display (display, xevent->xany.window);
+
if (window)
{
screen = GDK_WINDOW_SCREEN (window);
@@ -791,17 +800,26 @@ gdk_event_translate (GdkDisplay *display,
goto done;
}
}
- else if (window_private)
+ else if (filter_window)
{
/* Apply per-window filters */
+ GdkWindowObject *filter_private = (GdkWindowObject *) filter_window;
GdkFilterReturn result;
- result = gdk_event_apply_filters (xevent, event,
- window_private->filters);
-
- if (result != GDK_FILTER_CONTINUE)
+
+ if (filter_private->filters)
{
- return_val = (result == GDK_FILTER_TRANSLATE) ? TRUE : FALSE;
- goto done;
+ g_object_ref (filter_window);
+
+ result = gdk_event_apply_filters (xevent, event,
+ filter_private->filters);
+
+ g_object_unref (filter_window);
+
+ if (result != GDK_FILTER_CONTINUE)
+ {
+ return_val = (result == GDK_FILTER_TRANSLATE) ? TRUE : FALSE;
+ goto done;
+ }
}
}