diff options
author | culler <culler> | 2024-06-15 03:12:12 (GMT) |
---|---|---|
committer | culler <culler> | 2024-06-15 03:12:12 (GMT) |
commit | 5daf3d269c59e298355817203585c172cf488d07 (patch) | |
tree | 68342eacd631145f8e84de199b72d482abd00c91 | |
parent | 55453902cf3de34e45799dbc6fc7f59f6151ef56 (diff) | |
download | tk-5daf3d269c59e298355817203585c172cf488d07.zip tk-5daf3d269c59e298355817203585c172cf488d07.tar.gz tk-5daf3d269c59e298355817203585c172cf488d07.tar.bz2 |
Edit comments. Possible fix for crashes with TkTables.
-rw-r--r-- | macosx/tkMacOSXDraw.c | 17 | ||||
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 5 |
2 files changed, 21 insertions, 1 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 3435ebe..0e0a35e 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -1078,6 +1078,23 @@ XFillArcs( * Results: * Returns 0 if the scroll generated no additional damage. Otherwise, sets * the region that needs to be repainted after scrolling and returns 1. + * When drawRect was in use, this function used the now deprecated + * scrollRect method of NSView. With the current updateLayer + * implementation, using a CGImage as the view's backing layer, we are + * able to use XCopyArea. But both implementations are incomplete. + * They return a damage area which is just the source rectangle minus + * destination rectangle. Other platforms, e.g. Windows, where + * this function is essentially provided by the windowing system, + * are able to add to the damage region the bounding rectangles of + * all subwindows which meet the source rectangle, even if they are + * contained in the destination rectangle. The information needed + * to do that is not available in this module, as far as I know. + * + * In fact, the Text widget is the only one which calls this + * function, and textDisp.c compensates for this defect by using + * macOS-specific code. This is possible because access to the + * list of all embedded windows in a Text widget is available in + * that module. * * Side effects: * Scrolls the bits in the window. diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index d99c06b..c7320d4 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -1077,9 +1077,12 @@ ConfigureRestrictProc( /* * To make the reconfiguration actually happen we need to process * idle tasks generated when processing the ConfigureNotify events. + * We also process timer events - without that there were crashes + * when embedded windows in a Text widget were mapped for the first + * time during a live resize. This is unexplained. */ - while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {} + while (Tcl_DoOneEvent(TCL_TIMER_EVENTS|TCL_IDLE_EVENTS|TCL_DONT_WAIT)) {} /* * Now that Tk has configured all subwindows, create the clip regions. |