quartz: retain content view when switching over toplevel.

(cherry picked from commit 184407309f)
This commit is contained in:
Kristian Rietveld 2012-12-28 22:11:13 +01:00 committed by Michael Natterer
parent ce7d29aa89
commit 1d410ec960

View File

@ -2605,7 +2605,7 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
{ {
NSRect rect; NSRect rect;
old_view = [impl->toplevel contentView]; old_view = [[impl->toplevel contentView] retain];
rect = [impl->toplevel frame]; rect = [impl->toplevel frame];
@ -2680,6 +2680,8 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
*/ */
if (![old_view isOpaque] && [impl->toplevel hasShadow]) if (![old_view isOpaque] && [impl->toplevel hasShadow])
[(GdkQuartzView*)old_view setNeedsInvalidateShadow:YES]; [(GdkQuartzView*)old_view setNeedsInvalidateShadow:YES];
[old_view release];
} }
GDK_QUARTZ_RELEASE_POOL; GDK_QUARTZ_RELEASE_POOL;