GdkDeviceManagerCore: protect against xevent->xany.window not being a GdkWindow.

Conceivably this GdkEventTranslator may still be asked for events such as
NoExpose or GraphicsExpose for pixmaps. It is not meant to translate such events,
but should at least behave with them.
This commit is contained in:
Carlos Garnacho 2010-06-04 16:17:41 +02:00
parent 1b2e9124f0
commit 07b1a2e081

View File

@ -425,11 +425,11 @@ gdk_device_manager_core_translate_event (GdkEventTranslator *translator,
window = get_event_window (translator, xevent);
window_private = (GdkWindowObject *) window;
if (window && GDK_WINDOW_DESTROYED (window))
return FALSE;
if (window)
{
if (GDK_WINDOW_DESTROYED (window) || !GDK_IS_WINDOW (window))
return FALSE;
toplevel = _gdk_x11_window_get_toplevel (window);
window_impl = GDK_WINDOW_IMPL_X11 (window_private->impl);
g_object_ref (window);