git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5553 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-12-17 12:06:35 +00:00
parent d6e612f716
commit e08782709a
4 changed files with 30 additions and 47 deletions

View file

@ -1,3 +1,12 @@
Fri Dec 17 12:03:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSWindow.m: Remove some inefficient code that was calling
([content_view superview]) when we now have the _wv ivar.
* Source/NSView.m: Fix another autodisplay problem - when an opaque
subview was being set as needing display AND another non-overlapping
subview was set for display, the opaque subview didn't get redrawn.
* Source/NSPopUpButton.m: removed an NSLog
1999-12-16 Adam Fedor <fedor@gnu.org> 1999-12-16 Adam Fedor <fedor@gnu.org>
* New RTF parser from Stefan Bðhringer * New RTF parser from Stefan Bðhringer

View file

@ -281,8 +281,6 @@ Class _nspopupbuttonCellClass = 0;
[self sizeToFit]; [self sizeToFit];
NSLog(@"synchronizeTitleAndSelectedItem");
[self setNeedsDisplay: YES]; [self setNeedsDisplay: YES];
} }

View file

@ -1377,18 +1377,11 @@ GSSetDragTypes(NSView* obj, NSArray *types)
if (coordinates_valid == NO) if (coordinates_valid == NO)
[self _rebuildCoordinates]; [self _rebuildCoordinates];
/* /*
* If this view is higher in the view hierarchy than one that * If this view is higher in the view hierarchy than ones that
* actually needs display, it's invalidRect will be empty, so * actually needed display, it's invalidRect may not contain them
* we need to set it to the visibleRect. * so we need to display the union with the visibleRect.
*/ */
if (NSIsEmptyRect(invalidRect) == YES) rect = NSUnionRect(invalidRect, visibleRect);
{
rect = visibleRect;
}
else
{
rect = invalidRect;
}
rect = [firstOpaque convertRect: rect fromView: self]; rect = [firstOpaque convertRect: rect fromView: self];
[firstOpaque displayIfNeededInRectIgnoringOpacity: rect]; [firstOpaque displayIfNeededInRectIgnoringOpacity: rect];
} }
@ -1404,18 +1397,11 @@ GSSetDragTypes(NSView* obj, NSArray *types)
if (coordinates_valid == NO) if (coordinates_valid == NO)
[self _rebuildCoordinates]; [self _rebuildCoordinates];
/* /*
* If this view is higher in the view hierarchy than one that * If this view is higher in the view hierarchy than ones that
* actually needs display, it's invalidRect will be empty, so * actually needed display, it's invalidRect may not contain them
* we need to set it to the visibleRect. * so we need to display the union with the visibleRect.
*/ */
if (NSIsEmptyRect(invalidRect) == YES) rect = NSUnionRect(invalidRect, visibleRect);
{
rect = visibleRect;
}
else
{
rect = invalidRect;
}
[self displayIfNeededInRectIgnoringOpacity: rect]; [self displayIfNeededInRectIgnoringOpacity: rect];
} }
} }

View file

@ -1003,7 +1003,7 @@ static NSMapTable* windowmaps = NULL;
[first_responder becomeFirstResponder]; [first_responder becomeFirstResponder];
[self disableFlushWindow]; [self disableFlushWindow];
[[content_view superview] display]; [_wv display];
[self enableFlushWindow]; [self enableFlushWindow];
[self flushWindowIfNeeded]; [self flushWindowIfNeeded];
} }
@ -1012,7 +1012,7 @@ static NSMapTable* windowmaps = NULL;
{ {
if (_rFlags.needs_display) if (_rFlags.needs_display)
{ {
[[content_view superview] displayIfNeeded]; [_wv displayIfNeeded];
_rFlags.needs_display = NO; _rFlags.needs_display = NO;
} }
} }
@ -1243,7 +1243,7 @@ discardCursorRectsForView(NSView *theView)
- (void) discardCursorRects - (void) discardCursorRects
{ {
discardCursorRectsForView([content_view superview]); discardCursorRectsForView(_wv);
} }
- (void) enableCursorRects - (void) enableCursorRects
@ -1292,7 +1292,7 @@ resetCursorRectsForView(NSView *theView)
- (void) resetCursorRects - (void) resetCursorRects
{ {
[self discardCursorRects]; [self discardCursorRects];
resetCursorRectsForView([content_view superview]); resetCursorRectsForView(_wv);
_f.cursor_rects_valid = YES; _f.cursor_rects_valid = YES;
} }
@ -2228,33 +2228,23 @@ resetCursorRectsForView(NSView *theView)
source: (id)sourceObject source: (id)sourceObject
slideBack: (BOOL)slideFlag slideBack: (BOOL)slideFlag
{ {
/* [_wv dragImage: anImage
* Ensure we have a content view and it's associated window view. at: baseLocation
*/ offset: initialOffset
if (content_view == nil) event: event
[self setContentView: nil]; pasteboard: pboard
[[content_view superview] dragImage: anImage source: sourceObject
at: baseLocation slideBack: slideFlag];
offset: initialOffset
event: event
pasteboard: pboard
source: sourceObject
slideBack: slideFlag];
} }
- (void) registerForDraggedTypes: (NSArray*)newTypes - (void) registerForDraggedTypes: (NSArray*)newTypes
{ {
/* [_wv registerForDraggedTypes: newTypes];
* Ensure we have a content view and it's associated window view.
*/
if (content_view == nil)
[self setContentView: nil];
[[content_view superview] registerForDraggedTypes: newTypes];
} }
- (void) unregisterDraggedTypes - (void) unregisterDraggedTypes
{ {
[[content_view superview] unregisterDraggedTypes]; [_wv unregisterDraggedTypes];
} }
/* /*