From 577a9d3b2ca963ffebd97c5a092fea50cae3eddf Mon Sep 17 00:00:00 2001 From: Kevin Walzer Date: Wed, 31 Dec 2014 21:26:37 +0000 Subject: Reduce redraw issues during window zoom events on Cocoa --- library/button.tcl | 1 + macosx/tkMacOSXWindowEvent.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/library/button.tcl b/library/button.tcl index 815b137..c48515a 100644 --- a/library/button.tcl +++ b/library/button.tcl @@ -17,6 +17,7 @@ #------------------------------------------------------------------------- if {[tk windowingsystem] eq "aqua"} { + bind Radiobutton { tk::ButtonEnter %W } 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 -- cgit v0.12