From 0956571126625a99ea8f36cb14d8ce09c7fa0155 Mon Sep 17 00:00:00 2001 From: Kevin Walzer Date: Wed, 31 Dec 2014 21:27:29 +0000 Subject: Reduce redraw issues during window zoom events on Cocoa --- macosx/tkMacOSXWindowEvent.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index 9fd4867..c49fe15 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -80,6 +80,10 @@ 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]; @@ -107,6 +111,8 @@ extern NSString *opaqueTag; } TkGenWMConfigureEvent((Tk_Window) winPtr, x, y, width, height, flags); } + [[w contentView] setHidden:NO]; + NSEnableScreenUpdates(); } - (void) windowExpanded: (NSNotification *) notification -- cgit v0.12