[gtk+/client-side-windows: 254/284] Don't touch private->parent after its been change



commit 8690d19f032c6ca5fd7f783370f8e2d584f6ae62
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Feb 5 17:01:21 2009 +0100

    Don't touch private->parent after its been change
    
    The backend reparent may change private->parent, so we must use
    the old saved value.
---
 gdk/gdkwindow.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 1245e57..7a5431d 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -1150,8 +1150,8 @@ gdk_window_reparent (GdkWindow *window,
       new_parent_private = (GdkWindowObject *)new_parent;
     }
 
-  if (private->parent)
-    private->parent->children = g_list_remove (private->parent->children, window);
+  if (old_parent)
+    old_parent->children = g_list_remove (old_parent->children, window);
   
   private->parent = new_parent_private;
   private->x = x;



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