Import Tk 8.6.11
This commit is contained in:
@@ -104,43 +104,8 @@ enum {
|
||||
return processedEvent;
|
||||
}
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TkMacOSXFlushWindows --
|
||||
*
|
||||
* This routine is a stub called by XSync, which is called during the Tk
|
||||
* update command. The language specification does not require that the
|
||||
* update command be synchronous but many of the tests implicitly assume
|
||||
* that it is. It is definitely asynchronous on macOS since many idle
|
||||
* tasks are run inside of the drawRect method of a window's contentView,
|
||||
* which will not be called until after this function returns.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects: Processes all pending idle events then calls the display
|
||||
* method of each visible window.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
MODULE_SCOPE void
|
||||
TkMacOSXFlushWindows(void)
|
||||
{
|
||||
if (Tk_GetNumMainWindows() == 0) {
|
||||
return;
|
||||
}
|
||||
while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)){}
|
||||
for (NSWindow *w in [NSApp orderedWindows]) {
|
||||
[w display];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* mode: objc
|
||||
|
||||
Reference in New Issue
Block a user