diff options
author | culler <culler> | 2024-06-19 18:27:07 (GMT) |
---|---|---|
committer | culler <culler> | 2024-06-19 18:27:07 (GMT) |
commit | 321e71e5ce35e259f00d9405da28983fa9b820ea (patch) | |
tree | 6d89c2beffade0a57737cafe5bfadb8514694a60 | |
parent | cc10cafedd0c8000ace204e0cdd38bd24a8030d3 (diff) | |
download | tk-321e71e5ce35e259f00d9405da28983fa9b820ea.zip tk-321e71e5ce35e259f00d9405da28983fa9b820ea.tar.gz tk-321e71e5ce35e259f00d9405da28983fa9b820ea.tar.bz2 |
A little more clean-up.
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index 0cb15c1..cfb46aa 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -1014,7 +1014,7 @@ ConfigureRestrictProc( self.layer.contentsScale = self.window.screen.backingScaleFactor; [self resetTkLayerBitmapContext]; // need to redraw - [self generateExposeEvents: [self bounds]]; + [self generateExposeEvents: self.bounds]; } #endif @@ -1068,16 +1068,24 @@ ConfigureRestrictProc( while (Tcl_DoOneEvent(TCL_WINDOW_EVENTS|TCL_DONT_WAIT)) {} Tk_RestrictEvents(oldProc, oldArg, &oldArg); - /* - * Redraw the entire content view. - */ if ([w respondsToSelector: @selector (tkLayoutChanged)]) { [(TKWindow *)w tkLayoutChanged]; - [self generateExposeEvents:[self bounds]]; } + + /* + * Reset the cgimage layer and redraw the entire content view. + */ + + [self viewDidChangeBackingProperties]; + + /* + * In live resize we seem to need to draw a second time to + * avoid artifacts. + */ + if ([self inLiveResize]) { - [self viewDidChangeBackingProperties]; + [self generateExposeEvents:self.bounds]; } /* @@ -1087,6 +1095,7 @@ ConfigureRestrictProc( [NSApp _unlockAutoreleasePool]; } + // Schedule a redisplay of the view [self setNeedsDisplay:YES]; } |