Commit 9902a670 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Call the filters on the window where the event is received, not on the

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.)
parent defdebc5
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
......
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
......
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
......
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
......
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
......
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
......
......@@ -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;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment