diff options
author | Kevin Walzer <kw@codebykevin.com> | 2014-12-31 21:26:37 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2014-12-31 21:26:37 (GMT) |
commit | 577a9d3b2ca963ffebd97c5a092fea50cae3eddf (patch) | |
tree | 2c089cd4bf961660f4492322cf8d6d6e48697d7f /macosx | |
parent | 226cb2b752c57912f6b32e77b467e7e77d619079 (diff) | |
download | tk-577a9d3b2ca963ffebd97c5a092fea50cae3eddf.zip tk-577a9d3b2ca963ffebd97c5a092fea50cae3eddf.tar.gz tk-577a9d3b2ca963ffebd97c5a092fea50cae3eddf.tar.bz2 |
Reduce redraw issues during window zoom events on Cocoa
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index bce64f2..0e0d8ef 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 |