[gtk+/gtk-3-10] Ensure src and dest are GdkWindows in _gdk_sythesize_crossing_events
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-10] Ensure src and dest are GdkWindows in _gdk_sythesize_crossing_events
- Date: Fri, 11 Oct 2013 17:54:47 +0000 (UTC)
commit 3ca7cfe29b62883d7cfe736216deadfe35c9116c
Author: John Ralls <jralls ceridwen us>
Date: Fri Oct 11 10:40:50 2013 -0700
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.
gdk/gdkwindow.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 7437552..ee10901 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]