forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
d217f4d09e
commit
e67347a3c8
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user