Return GDK_FILTER_CONTINUE for unhandled message types.

Thu Feb 26 17:29:04 2004  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
        GDK_FILTER_CONTINUE for unhandled message types.

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Allow
        multiple filters for the same event type with the standard
        "GDK_FILTER_CONTINUE == pretend I wasn't here" semantics.

        * gdk/x11/gdkevents-x11.c (gdk_display_add_client_message_filter):
        Append to the filter list not prepend, since order now matters.

        * gdk/win32/gdkevents-win32.c (gdk_add_client_message_filter):
        Append to the filter list not prepend, since order now matters.
This commit is contained in:
Owen Taylor
2004-02-26 22:53:50 +00:00
committed by Owen Taylor
parent bb4db89398
commit 04ebfe9465
7 changed files with 87 additions and 7 deletions

View File

@ -1,3 +1,18 @@
Thu Feb 26 17:29:04 2004 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
GDK_FILTER_CONTINUE for unhandled message types.
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Allow
multiple filters for the same event type with the standard
"GDK_FILTER_CONTINUE == pretend I wasn't here" semantics.
* gdk/x11/gdkevents-x11.c (gdk_display_add_client_message_filter):
Append to the filter list not prepend, since order now matters.
* gdk/win32/gdkevents-win32.c (gdk_add_client_message_filter):
Append to the filter list not prepend, since order now matters.
Thu Feb 26 23:39:07 2004 Matthias Clasen <maclas@gmx.de> Thu Feb 26 23:39:07 2004 Matthias Clasen <maclas@gmx.de>
Fixes for #135333, analysed by Damon Chaplin: Fixes for #135333, analysed by Damon Chaplin:

View File

@ -1,3 +1,18 @@
Thu Feb 26 17:29:04 2004 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
GDK_FILTER_CONTINUE for unhandled message types.
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Allow
multiple filters for the same event type with the standard
"GDK_FILTER_CONTINUE == pretend I wasn't here" semantics.
* gdk/x11/gdkevents-x11.c (gdk_display_add_client_message_filter):
Append to the filter list not prepend, since order now matters.
* gdk/win32/gdkevents-win32.c (gdk_add_client_message_filter):
Append to the filter list not prepend, since order now matters.
Thu Feb 26 23:39:07 2004 Matthias Clasen <maclas@gmx.de> Thu Feb 26 23:39:07 2004 Matthias Clasen <maclas@gmx.de>
Fixes for #135333, analysed by Damon Chaplin: Fixes for #135333, analysed by Damon Chaplin:

View File

@ -1,3 +1,18 @@
Thu Feb 26 17:29:04 2004 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
GDK_FILTER_CONTINUE for unhandled message types.
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Allow
multiple filters for the same event type with the standard
"GDK_FILTER_CONTINUE == pretend I wasn't here" semantics.
* gdk/x11/gdkevents-x11.c (gdk_display_add_client_message_filter):
Append to the filter list not prepend, since order now matters.
* gdk/win32/gdkevents-win32.c (gdk_add_client_message_filter):
Append to the filter list not prepend, since order now matters.
Thu Feb 26 23:39:07 2004 Matthias Clasen <maclas@gmx.de> Thu Feb 26 23:39:07 2004 Matthias Clasen <maclas@gmx.de>
Fixes for #135333, analysed by Damon Chaplin: Fixes for #135333, analysed by Damon Chaplin:

View File

@ -1,3 +1,18 @@
Thu Feb 26 17:29:04 2004 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
GDK_FILTER_CONTINUE for unhandled message types.
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Allow
multiple filters for the same event type with the standard
"GDK_FILTER_CONTINUE == pretend I wasn't here" semantics.
* gdk/x11/gdkevents-x11.c (gdk_display_add_client_message_filter):
Append to the filter list not prepend, since order now matters.
* gdk/win32/gdkevents-win32.c (gdk_add_client_message_filter):
Append to the filter list not prepend, since order now matters.
Thu Feb 26 23:39:07 2004 Matthias Clasen <maclas@gmx.de> Thu Feb 26 23:39:07 2004 Matthias Clasen <maclas@gmx.de>
Fixes for #135333, analysed by Damon Chaplin: Fixes for #135333, analysed by Damon Chaplin:

View File

@ -1,3 +1,18 @@
Thu Feb 26 17:29:04 2004 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
GDK_FILTER_CONTINUE for unhandled message types.
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Allow
multiple filters for the same event type with the standard
"GDK_FILTER_CONTINUE == pretend I wasn't here" semantics.
* gdk/x11/gdkevents-x11.c (gdk_display_add_client_message_filter):
Append to the filter list not prepend, since order now matters.
* gdk/win32/gdkevents-win32.c (gdk_add_client_message_filter):
Append to the filter list not prepend, since order now matters.
Thu Feb 26 23:39:07 2004 Matthias Clasen <maclas@gmx.de> Thu Feb 26 23:39:07 2004 Matthias Clasen <maclas@gmx.de>
Fixes for #135333, analysed by Damon Chaplin: Fixes for #135333, analysed by Damon Chaplin:

View File

@ -812,7 +812,7 @@ gdk_add_client_message_filter (GdkAtom message_type,
filter->function = func; filter->function = func;
filter->data = data; filter->data = data;
client_filters = g_list_prepend (client_filters, filter); client_filters = g_list_append (client_filters, filter);
} }
static void static void

View File

@ -355,7 +355,7 @@ gdk_display_add_client_message_filter (GdkDisplay *display,
filter->data = data; filter->data = data;
GDK_DISPLAY_X11(display)->client_filters = GDK_DISPLAY_X11(display)->client_filters =
g_list_prepend (GDK_DISPLAY_X11 (display)->client_filters, g_list_append (GDK_DISPLAY_X11 (display)->client_filters,
filter); filter);
} }
@ -1867,13 +1867,14 @@ gdk_event_translate (GdkDisplay *display,
while (tmp_list) while (tmp_list)
{ {
GdkClientFilter *filter = tmp_list->data; GdkClientFilter *filter = tmp_list->data;
tmp_list = tmp_list->next;
if (filter->type == message_type) if (filter->type == message_type)
{ {
result = (*filter->function) (xevent, event, filter->data); result = (*filter->function) (xevent, event, filter->data);
if (result != GDK_FILTER_CONTINUE)
break; break;
} }
tmp_list = tmp_list->next;
} }
switch (result) switch (result)
@ -2014,6 +2015,8 @@ gdk_wm_protocols_filter (GdkXEvent *xev,
_gdk_x11_set_input_focus_safe (display, toplevel->focus_window, _gdk_x11_set_input_focus_safe (display, toplevel->focus_window,
RevertToParent, RevertToParent,
xevent->xclient.data.l[1]); xevent->xclient.data.l[1]);
return GDK_FILTER_REMOVE;
} }
else if ((Atom) xevent->xclient.data.l[0] == gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_PING") && else if ((Atom) xevent->xclient.data.l[0] == gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_PING") &&
!_gdk_x11_display_is_root_window (display, !_gdk_x11_display_is_root_window (display,
@ -2026,9 +2029,11 @@ gdk_wm_protocols_filter (GdkXEvent *xev,
xev.xclient.window, xev.xclient.window,
False, False,
SubstructureRedirectMask | SubstructureNotifyMask, &xev); SubstructureRedirectMask | SubstructureNotifyMask, &xev);
}
return GDK_FILTER_REMOVE; return GDK_FILTER_REMOVE;
}
return GDK_FILTER_CONTINUE;
} }
void void