Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Do not process timer events in drawRect (Thanks to Nicolas Bats) and remove references to ServiceMode since Tcl_ServiceAll is not being called anymore. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | idle_curiosity |
Files: | files | file ages | folders |
SHA3-256: |
491f5a56ddf503da11f1e1d8b82f58a9 |
User & Date: | marc_culler 2020-07-13 14:54:33 |
Context
2020-07-14
| ||
13:26 | Remove duplicate line in tkMacOSXWindowEvent.c check-in: 7ac28ee6 user: marc_culler tags: idle_curiosity | |
2020-07-13
| ||
14:54 | Do not process timer events in drawRect (Thanks to Nicolas Bats) and remove references to ServiceMode since Tcl_ServiceAll is not being called anymore. check-in: 491f5a56 user: marc_culler tags: idle_curiosity | |
2020-07-12
| ||
22:20 | Tweak and untweak a couple of tests with race conditions. check-in: 3fae4554 user: marc_culler tags: idle_curiosity | |
Changes
Changes to macosx/tkMacOSXNotify.c.
︙ | ︙ | |||
257 258 259 260 261 262 263 | Tcl_Panic("Tk_MacOSXSetupTkNotifier: %s", "first [load] of TkAqua has to occur in the main thread!"); } Tcl_CreateEventSource(TkMacOSXEventsSetupProc, TkMacOSXEventsCheckProc, NULL); TkCreateExitHandler(TkMacOSXNotifyExitHandler, NULL); | < | 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | Tcl_Panic("Tk_MacOSXSetupTkNotifier: %s", "first [load] of TkAqua has to occur in the main thread!"); } Tcl_CreateEventSource(TkMacOSXEventsSetupProc, TkMacOSXEventsCheckProc, NULL); TkCreateExitHandler(TkMacOSXNotifyExitHandler, NULL); TclMacOSXNotifierAddRunLoopMode(NSEventTrackingRunLoopMode); TclMacOSXNotifierAddRunLoopMode(NSModalPanelRunLoopMode); } } } /* |
︙ | ︙ |
Changes to macosx/tkMacOSXWindowEvent.c.
︙ | ︙ | |||
87 88 89 90 91 92 93 | } if (!movedOnly && (winPtr->changes.width != bounds.size.width || winPtr->changes.height != bounds.size.height)) { width = bounds.size.width - wmPtr->xInParent; height = bounds.size.height - wmPtr->yInParent; flags |= TK_SIZE_CHANGED; } | < | | | | < < < | | | | | | | | | | < < < | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | } if (!movedOnly && (winPtr->changes.width != bounds.size.width || winPtr->changes.height != bounds.size.height)) { width = bounds.size.width - wmPtr->xInParent; height = bounds.size.height - wmPtr->yInParent; flags |= TK_SIZE_CHANGED; } /* * Propagate geometry changes immediately. */ flags |= TK_MACOSX_HANDLE_EVENT_IMMEDIATELY; TkGenWMConfigureEvent((Tk_Window) winPtr, x, y, width, height, flags); } } - (void) windowExpanded: (NSNotification *) notification { #ifdef TK_MAC_DEBUG_NOTIFICATIONS TKLog(@"-[%@(%p) %s] %@", [self class], self, _cmd, notification); #endif NSWindow *w = [notification object]; TkWindow *winPtr = TkMacOSXGetTkWindow(w); if (winPtr) { winPtr->wmInfoPtr->hints.initial_state = TkMacOSXIsWindowZoomed(winPtr) ? ZoomState : NormalState; Tk_MapWindow((Tk_Window) winPtr); /* * Process all Tk events generated by Tk_MapWindow(). */ while (Tcl_ServiceEvent(0)) {} while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {} /* * NSWindowDidDeminiaturizeNotification is received after * NSWindowDidBecomeKeyNotification, so activate manually */ GenerateActivateEvents(winPtr, 1); } } - (NSRect)windowWillUseStandardFrame:(NSWindow *)window defaultFrame:(NSRect)newFrame { /* |
︙ | ︙ | |||
1093 1094 1095 1096 1097 1098 1099 | * effect.) * * Fortunately, Tk schedules all drawing to be done while Tcl is idle. * So we can do the drawing now by processing all of the idle events * that were created when the expose events were processed. */ | | | 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 | * effect.) * * Fortunately, Tk schedules all drawing to be done while Tcl is idle. * So we can do the drawing now by processing all of the idle events * that were created when the expose events were processed. */ while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {} } } /* * This method is called when a user changes between light and dark mode. The * implementation here generates a Tk virtual event which can be bound to a * function that redraws the window in an appropriate style. |
︙ | ︙ |
Changes to tests/textDisp.test.
︙ | ︙ | |||
4192 4193 4194 4195 4196 4197 4198 4199 4200 | set result "ok" } } {ok} test textDisp-33.2 {one line longer than fits in the widget} { destroy .tt pack [text .tt -wrap char] .tt debug 1 set tk_textHeightCalc "" .tt insert 1.0 [string repeat "more wrap + " 1] | > > > | < | | 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 | set result "ok" } } {ok} test textDisp-33.2 {one line longer than fits in the widget} { destroy .tt pack [text .tt -wrap char] .tt debug 1 update idletasks set tk_textHeightCalc "" set timer [after 700 lappend tk_textHeightCalc "Timed out"] .tt insert 1.0 [string repeat "more wrap + " 1] vwait tk_textHeightCalc after cancel timer set tk_textHeightCalc } {1.0} test textDisp-33.3 {one line longer than fits in the widget} { destroy .tt pack [text .tt -wrap char] .tt debug 1 set tk_textHeightCalc "" .tt insert 1.0 [string repeat "more wrap + " 300] updateText |
︙ | ︙ |