diff options
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXEvent.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/macosx/tkMacOSXEvent.c b/macosx/tkMacOSXEvent.c index 843ef8c..d866b02 100644 --- a/macosx/tkMacOSXEvent.c +++ b/macosx/tkMacOSXEvent.c @@ -137,13 +137,22 @@ MODULE_SCOPE void TkMacOSXFlushWindows(void) { NSArray *macWindows = [NSApp orderedWindows]; + if ([macWindows count] > 0) { while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)){} } - for (NSWindow *w in macWindows) { - if (TkMacOSXGetXWindow(w)) { - [w displayIfNeeded]; - } + if ([NSApp isDrawing]) { + for (NSWindow *w in macWindows) { + if (TkMacOSXGetXWindow(w)) { + [w setViewsNeedDisplay:YES]; + } + } + } else { + for (NSWindow *w in macWindows) { + if (TkMacOSXGetXWindow(w)) { + [w display]; + } + } } } |