x11: Skip GenericEvents with no cookie data in the xi2 device manager

https://bugzilla.gnome.org/show_bug.cgi?id=653947

It could happen that a cookie event has been already allocated/freed
in an event filter, as it can't be allocated a second time, all GDK
can do is skipping the event. Spotted by Guillaume Desmottes.
This commit is contained in:
Carlos Garnacho 2011-07-15 18:33:44 +02:00
parent 6aab48ead0
commit b5f30143ed

View File

@ -1025,6 +1025,9 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
ev = (XIEvent *) cookie->data; ev = (XIEvent *) cookie->data;
if (!ev)
return FALSE;
window = get_event_window (translator, ev); window = get_event_window (translator, ev);
if (window && GDK_WINDOW_DESTROYED (window)) if (window && GDK_WINDOW_DESTROYED (window))