diff options
author | culler <culler> | 2024-06-19 21:29:24 (GMT) |
---|---|---|
committer | culler <culler> | 2024-06-19 21:29:24 (GMT) |
commit | 716977c2dc0bb759c929da0f34a0a20b4eb967ad (patch) | |
tree | b1857a4c970350790b9ec89b435722e58fb4bdec | |
parent | 321e71e5ce35e259f00d9405da28983fa9b820ea (diff) | |
download | tk-716977c2dc0bb759c929da0f34a0a20b4eb967ad.zip tk-716977c2dc0bb759c929da0f34a0a20b4eb967ad.tar.gz tk-716977c2dc0bb759c929da0f34a0a20b4eb967ad.tar.bz2 |
Remove duplicate calls to reset the cgimage backing layer.
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index cfb46aa..2c16cf8 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -1033,7 +1033,6 @@ ConfigureRestrictProc( -(void) setFrameSize: (NSSize)newsize { [super setFrameSize: newsize]; - [self resetTkLayerBitmapContext]; NSWindow *w = [self window]; TkWindow *winPtr = TkMacOSXGetTkWindow(w); Tk_Window tkwin = (Tk_Window)winPtr; @@ -1045,19 +1044,12 @@ ConfigureRestrictProc( Tk_RestrictProc *oldProc; /* - * This can be called from outside the Tk event loop. Since it calls - * Tcl_DoOneEvent, we need to make sure we don't clobber the - * AutoreleasePool set up by the caller. + * This function can be re-entered. So we need to make sure we don't + * clobber any AutoreleasePool set up by the caller. */ [NSApp _lockAutoreleasePool]; - /* - * Disable Tk drawing until the window has been completely configured. - */ - - //TkMacOSXSetDrawingEnabled(winPtr, 0); - /* * Generate and handle a ConfigureNotify event for the new size. */ @@ -1069,6 +1061,10 @@ ConfigureRestrictProc( Tk_RestrictEvents(oldProc, oldArg, &oldArg); + /* + * Update Tk's window data for the new size. + */ + if ([w respondsToSelector: @selector (tkLayoutChanged)]) { [(TKWindow *)w tkLayoutChanged]; } @@ -1095,7 +1091,11 @@ ConfigureRestrictProc( [NSApp _unlockAutoreleasePool]; } - // Schedule a redisplay of the view + + /* + * Schedule a redisplay of the view. + */ + [self setNeedsDisplay:YES]; } |