[gtk+/client-side-windows: 210/284] Don't send crossing events to destroyed windows



commit d6ad734c7f8361317e2c1367933d8ccd93c3b2a4
Author: Alexander Larsson <alexl redhat com>
Date:   Mon Feb 2 12:50:18 2009 +0100

    Don't send crossing events to destroyed windows
---
 gdk/gdkdisplay.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 48d79e8..8b518ad 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -990,7 +990,8 @@ switch_to_pointer_grab (GdkDisplay *display,
     {
       pointer_window = _gdk_windowing_window_at_pointer (display,  &x, &y, &state);
       if (pointer_window != NULL &&
-	  (GDK_WINDOW_TYPE (pointer_window) == GDK_WINDOW_ROOT ||
+	  (GDK_WINDOW_DESTROYED (pointer_window) ||
+	   GDK_WINDOW_TYPE (pointer_window) == GDK_WINDOW_ROOT ||
 	   GDK_WINDOW_TYPE (pointer_window) == GDK_WINDOW_FOREIGN))
 	pointer_window = NULL;
       
@@ -1006,7 +1007,8 @@ switch_to_pointer_grab (GdkDisplay *display,
 	{
 	  /* Convert to toplevel */
 	  w = (GdkWindowObject *)pointer_window;
-	  while (w->parent->window_type != GDK_WINDOW_ROOT)
+	  while (/*w->parent != NULL && */
+		 w->parent->window_type != GDK_WINDOW_ROOT)
 	    {
 	      x += w->x;
 	      y += w->y;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]