[gtk+/gtk-3-6] quartz: Make sure the old toplevel is closed on recreation (cherry picked from commit ce7d29aa8959de



commit a38de21ac41db74a1238d387660579b0e9a561f9
Author: Kristian Rietveld <kris loopnest org>
Date:   Fri Dec 28 22:06:32 2012 +0100

    quartz: Make sure the old toplevel is closed on recreation
    (cherry picked from commit ce7d29aa8959deb76f6d4a92ac9a1337ce8ed8e1)

 gdk/quartz/gdkwindow-quartz.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 1d61250..a1fcfee 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -2652,7 +2652,11 @@ gdk_quartz_window_set_decorations (GdkWindow       *window,
           NSColor *bg = [impl->toplevel backgroundColor];
           NSScreen *screen = [impl->toplevel screen];
 
-          [impl->toplevel release];
+          /* Make sure the old window is closed, recall that releasedWhenClosed
+           * is set on GdkQuartzWindows.
+           */
+          [impl->toplevel close];
+
           impl->toplevel = [[GdkQuartzNSWindow alloc] initWithContentRect:rect
                                                                 styleMask:new_mask
                                                                   backing:NSBackingStoreBuffered



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