From 237afd75300fd2b491666698252f655fd1ececdb Mon Sep 17 00:00:00 2001 From: Kevin Walzer Date: Sat, 14 Feb 2015 01:22:19 +0000 Subject: Remove calls during window resize notification that cause crash on Cocoa --- macosx/tkMacOSXWindowEvent.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index e1a0f6f..cf8d9a6 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -80,10 +80,6 @@ extern NSString *opaqueTag; NSWindow *w = [notification object]; TkWindow *winPtr = TkMacOSXGetTkWindow(w); - /*Disable drawing until window is resized removes flicker and drawing artifacts;necessary after removal of private API.*/ - NSDisableScreenUpdates(); - [ [w contentView] setHidden:YES]; - if (winPtr) { WmInfo *wmPtr = winPtr->wmInfoPtr; NSRect bounds = [w frame]; @@ -111,8 +107,6 @@ extern NSString *opaqueTag; } TkGenWMConfigureEvent((Tk_Window) winPtr, x, y, width, height, flags); } - [[w contentView] setHidden:NO]; - NSEnableScreenUpdates(); } - (void) windowExpanded: (NSNotification *) notification @@ -845,8 +839,7 @@ ExposeRestrictProc( -(void) viewWillDraw { - - [super viewWillDraw]; + [super viewWillDraw]; } - (BOOL) preservesContentDuringLiveResize @@ -856,10 +849,10 @@ ExposeRestrictProc( - (void)viewWillStartLiveResize { - NSDisableScreenUpdates(); - [super viewWillStartLiveResize]; - [self setNeedsDisplay:NO]; - [self setHidden:YES]; + NSDisableScreenUpdates(); + [super viewWillStartLiveResize]; + [self setNeedsDisplay:NO]; + [self setHidden:YES]; } -- cgit v0.12