Ensure src and dest are GdkWindows in _gdk_sythesize_crossing_events

Discovered via a crash because b's (dest's) toplevel was NULL;
ensuring that the dest is actually a GdkWindow or setting b to NULL
prevents that path from being taken.
This commit is contained in:
John Ralls
2013-10-11 10:40:50 -07:00
parent d0065270ac
commit cf66cf906e

View File

@@ -7570,8 +7570,9 @@ _gdk_synthesize_crossing_events (GdkDisplay *display,
/* TODO: Don't send events to toplevel, as we get those from the windowing system */
a = src;
b = dest;
a = (src && GDK_IS_WINDOW (src)) ? src : NULL;
b = (dest && GDK_IS_WINDOW (dest)) ? dest : NULL;
if (src == dest)
return; /* No crossings generated between src and dest */