diff options
author | culler <culler> | 2024-06-22 16:16:37 (GMT) |
---|---|---|
committer | culler <culler> | 2024-06-22 16:16:37 (GMT) |
commit | fc4199e50686faf5dd37455e4a9313b137707f82 (patch) | |
tree | 17597469b9c21f05aa9fc73143426d345229e1ac /macosx | |
parent | a1b9917ea6b5178d4e212d172d52f59a6359e31e (diff) | |
download | tk-fc4199e50686faf5dd37455e4a9313b137707f82.zip tk-fc4199e50686faf5dd37455e4a9313b137707f82.tar.gz tk-fc4199e50686faf5dd37455e4a9313b137707f82.tar.bz2 |
Try adding an event loop to run idle tasks in updateLayer.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index 6c3f07a..5d0121d 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -983,7 +983,6 @@ ConfigureRestrictProc( } - (void) updateLayer { CGContextRef context = self.tkLayerBitmapContext; - if (context) { /* * Create a CGImage by copying (probably using copy-on-write) the @@ -997,6 +996,12 @@ ConfigureRestrictProc( CGImageRef newImg = CGBitmapContextCreateImage(context); self.layer.contents = (__bridge id) newImg; CGImageRelease(newImg); // will quickly leak memory if this is missing + + /* + * Run any pending widget display procs as part of the update. + */ + + while(Tcl_DoOneEvent(TCL_IDLE_EVENTS)){} [self clearTkDirtyRect]; } } @@ -1035,8 +1040,8 @@ ConfigureRestrictProc( { NSSize oldsize = self.bounds.size; [super setFrameSize: newsize]; - if (newsize.width == 1 && newsize.height == 1 || - oldsize.width == 0 && oldsize.height == 0) { + if ((newsize.width == 1 && newsize.height == 1) || + (oldsize.width == 0 && oldsize.height == 0)) { return; } NSWindow *w = [self window]; |