[gtk+/gtk-2-24] quartz: retain content view when switching over toplevel.



commit 184407309f83a06b9215c8123091263d483edc8b
Author: Kristian Rietveld <kris loopnest org>
Date:   Fri Dec 28 22:11:13 2012 +0100

    quartz: retain content view when switching over toplevel.

 gdk/quartz/gdkwindow-quartz.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 510ea24..7302090 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -2685,7 +2685,7 @@ gdk_window_set_decorations (GdkWindow       *window,
     {
       NSRect rect;
 
-      old_view = [impl->toplevel contentView];
+      old_view = [[impl->toplevel contentView] retain];
 
       rect = [impl->toplevel frame];
 
@@ -2760,6 +2760,8 @@ gdk_window_set_decorations (GdkWindow       *window,
        */
       if (![old_view isOpaque] && [impl->toplevel hasShadow])
         [(GdkQuartzView*)old_view setNeedsInvalidateShadow:YES];
+
+      [old_view release];
     }
 
   GDK_QUARTZ_RELEASE_POOL;



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