summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2014-12-31 21:27:29 (GMT)
committerKevin Walzer <kw@codebykevin.com>2014-12-31 21:27:29 (GMT)
commitf7af159ab2000da815a8d6b0fa817c06583d4818 (patch)
tree0b75a2f3729c1581eeb02ce5956e55784fb6fb9e /macosx
parent03659e86d1a52a6ea286f7057681d233067a27a0 (diff)
downloadtk-f7af159ab2000da815a8d6b0fa817c06583d4818.zip
tk-f7af159ab2000da815a8d6b0fa817c06583d4818.tar.gz
tk-f7af159ab2000da815a8d6b0fa817c06583d4818.tar.bz2
Reduce redraw issues during window zoom events on Cocoa
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXWindowEvent.c6
1 files changed, 6 insertions, 0 deletions
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