diff options
author | marc_culler <marc.culler@gmail.com> | 2020-07-18 16:53:31 (GMT) |
---|---|---|
committer | marc_culler <marc.culler@gmail.com> | 2020-07-18 16:53:31 (GMT) |
commit | b63b41199525b0e3e0e95f65e6991f75f8e31dd5 (patch) | |
tree | 40c8cd9613fe3160eb087628d192d6ee40a35487 /macosx/tkMacOSXXStubs.c | |
parent | 451fa4203bff3f5e6a0ab5028f900823174b4c83 (diff) | |
parent | 132c939d5ab36c6a55d7bc9e1692fd981c9a88ca (diff) | |
download | tk-b63b41199525b0e3e0e95f65e6991f75f8e31dd5.zip tk-b63b41199525b0e3e0e95f65e6991f75f8e31dd5.tar.gz tk-b63b41199525b0e3e0e95f65e6991f75f8e31dd5.tar.bz2 |
Provide better control over how and when [NSView drawRect:] is called.
Diffstat (limited to 'macosx/tkMacOSXXStubs.c')
-rw-r--r-- | macosx/tkMacOSXXStubs.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c index 6aeec36..107f712 100644 --- a/macosx/tkMacOSXXStubs.c +++ b/macosx/tkMacOSXXStubs.c @@ -752,7 +752,18 @@ XSync( Display *display, Bool discard) { - TkMacOSXFlushWindows(); + /* + * The main use of XSync is by the update command, which alternates + * between running an event loop to process all events without waiting and + * calling XSync on all displays until no events are left. There is + * nothing for the mac to do with respect to syncing its one display but + * it can (and, during regression testing, frequently does) happen that + * timer events fire during the event loop. Processing those here seems + * to make the update command work in a way that is more consistent with + * its behavior on other platforms. + */ + + while (Tcl_DoOneEvent(TCL_TIMER_EVENTS|TCL_DONT_WAIT)){} display->request++; return 0; } @@ -945,7 +956,7 @@ XSynchronize( Display *display, Bool onoff) { - display->request++; + display->request++; return NULL; } |