[gtk+] quartz: Make sure the old toplevel is closed on recreation (cherry picked from commit 30deba453a0451



commit ce7d29aa8959deb76f6d4a92ac9a1337ce8ed8e1
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 30deba453a045107eadd4deea572e29192c298c1)

 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]