forked from AuroraMiddleware/gtk
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:
parent
1b2e9124f0
commit
07b1a2e081
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user