summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWindowEvent.c
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)
commit0956571126625a99ea8f36cb14d8ce09c7fa0155 (patch)
treea5c1c4196fc0fd37a861ee4069a7b02bdd69f140 /macosx/tkMacOSXWindowEvent.c
parent3e92360d499d4e74fa246d253a187abbc4702da5 (diff)
downloadtk-0956571126625a99ea8f36cb14d8ce09c7fa0155.zip
tk-0956571126625a99ea8f36cb14d8ce09c7fa0155.tar.gz
tk-0956571126625a99ea8f36cb14d8ce09c7fa0155.tar.bz2
Reduce redraw issues during window zoom events on Cocoa
Diffstat (limited to 'macosx/tkMacOSXWindowEvent.c')
-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