From ed2acc2520062267f8457a19a1e3ac06d496959d Mon Sep 17 00:00:00 2001 From: richard Date: Sun, 16 May 1999 06:52:39 +0000 Subject: [PATCH] Improve flushing by using new focus lock/unlock git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4256 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 4 ++++ Source/NSView.m | 18 +++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1aefd3c7e..db43da38f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun May 16 8:15:00 1999 Richard Frith-Macdonald + + * Source/NSView.m: Use new context lock/unlock operations. + Mon May 14 19:50:00 1999 Richard Frith-Macdonald * Tools/make_services.m: Fix to get correct type info cached. diff --git a/Source/NSView.m b/Source/NSView.m index 2ca1b3b20..2d97ba3a2 100644 --- a/Source/NSView.m +++ b/Source/NSView.m @@ -1178,9 +1178,11 @@ static SEL invalidateSel = @selector(_invalidateCoordinates); redrawRect = NSIntersectionRect(aRect, invalidRect); if (NSIsEmptyRect(redrawRect) == NO) { - [self lockFocus]; + NSGraphicsContext *ctxt = GSCurrentContext(); + + [ctxt lockFocusView: self inRect: redrawRect]; [self drawRect: redrawRect]; - [self unlockFocus]; + [ctxt unlockFocusView: self needsFlush: YES]; } if (_rFlags.has_subviews) @@ -1273,9 +1275,10 @@ static SEL invalidateSel = @selector(_invalidateCoordinates); - (void) displayRectIgnoringOpacity: (NSRect)aRect { - unsigned i, count; - NSRect rect; - BOOL stillNeedsDisplay = NO; + unsigned i, count; + NSRect rect; + BOOL stillNeedsDisplay = NO; + NSGraphicsContext *ctxt; if (!window) return; @@ -1283,9 +1286,10 @@ static SEL invalidateSel = @selector(_invalidateCoordinates); if (coordinates_valid == NO) [self _rebuildCoordinates]; - [self lockFocus]; + ctxt = GSCurrentContext(); + [ctxt lockFocusView: self inRect: aRect]; [self drawRect: aRect]; - [self unlockFocus]; + [ctxt unlockFocusView: self needsFlush: YES]; if (_rFlags.has_subviews) {