[gtk+] quartz: retain content view when switching over toplevel. (cherry picked from commit 184407309f83a06



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

    quartz: retain content view when switching over toplevel.
    (cherry picked from commit 184407309f83a06b9215c8123091263d483edc8b)

 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 a1fcfee..b83adfc 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -2605,7 +2605,7 @@ gdk_quartz_window_set_decorations (GdkWindow       *window,
     {
       NSRect rect;
 
-      old_view = [impl->toplevel contentView];
+      old_view = [[impl->toplevel contentView] retain];
 
       rect = [impl->toplevel frame];
 
@@ -2680,6 +2680,8 @@ gdk_quartz_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]