Lock focus fixes - get cells to lock focus before drawing themselves.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4924 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-09-21 05:10:54 +00:00
parent 0424173e96
commit 98a649c60a
13 changed files with 85 additions and 25 deletions

View file

@ -77,7 +77,7 @@ static Class cellClass;
- (id) initWithFrame: (NSRect)frameRect
{
[super initWithFrame: frameRect];
[self setCell: AUTORELEASE([cellClass new])];
[self setCell: AUTORELEASE([[[self class] cellClass] new])];
tag = 0;
return self;
@ -319,7 +319,8 @@ static Class cellClass;
{
if (cell == aCell)
{
[cell drawInteriorWithFrame: bounds inView: self];
[cell drawInteriorWithFrame: [cell drawingRectForBounds: bounds]
inView: self];
}
}
@ -413,7 +414,6 @@ static Class cellClass;
unsigned int event_mask = NSLeftMouseDownMask | NSLeftMouseUpMask |
NSMouseMovedMask | NSLeftMouseDraggedMask |
NSRightMouseDraggedMask;
NSDebugLog(@"NSControl mouseDown\n");
if (![self isEnabled])
@ -426,8 +426,6 @@ static Class cellClass;
[window _captureMouse: self];
[self lockFocus];
e = theEvent;
while (!done) // loop until mouse goes up
{
@ -472,7 +470,7 @@ static Class cellClass;
[cell highlight: NO withFrame: bounds inView: self];
[window flushWindow];
}
[self unlockFocus];
[cell sendActionOn: oldActionMask];
if (mouseUp)