diff --git a/ChangeLog b/ChangeLog index 6a7597d40..a05213fbc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-11-07 15:28 Alexander Malmberg + + * Source/NSControl.m (-mouseDown:): Rewrite to use -setHighlighted: + and the normal drawing mechanisms instead of trying to draw and flush + manually. (Fixes a bunch of visual glitches.) + 2003-11-07 14:42 Alexander Malmberg * Source/NSInputManager.m (-loadBindingsFromFile:): Handle errors diff --git a/Source/NSControl.m b/Source/NSControl.m index aa658dc82..48aa1bf6c 100644 --- a/Source/NSControl.m +++ b/Source/NSControl.m @@ -562,7 +562,6 @@ static Class actionCellClass; } [_window _captureMouse: self]; - [self lockFocus]; e = theEvent; while (!done) // loop until mouse goes up @@ -574,8 +573,8 @@ static Class actionCellClass; if ((location.x >= 0) && (location.x < _bounds.size.width) && (location.y >= 0 && location.y < _bounds.size.height)) { - [_cell highlight: YES withFrame: _bounds inView: self]; - [_window flushWindow]; + [_cell setHighlighted: YES]; + [self setNeedsDisplay: YES]; if ([_cell trackMouse: e inRect: _bounds ofView: self @@ -583,8 +582,8 @@ static Class actionCellClass; done = mouseUp = YES; else { - [_cell highlight: NO withFrame: _bounds inView: self]; - [_window flushWindow]; + [_cell setHighlighted: NO]; + [self setNeedsDisplay: YES]; } } @@ -603,13 +602,10 @@ static Class actionCellClass; if (mouseUp) { -// [cell setState: ![cell state]]; - [_cell highlight: NO withFrame: _bounds inView: self]; - [_window flushWindow]; + [_cell setHighlighted: NO]; + [self setNeedsDisplay: YES]; } - [self unlockFocus]; - [_cell sendActionOn: oldActionMask]; if (mouseUp)