mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 05:50:48 +00:00
(-mouseDown:): Rewrite to use -setHighlighted: and the normal drawing mechanism instead of trying to draw and flush manually.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18060 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ca2773de30
commit
04ee2f9928
2 changed files with 12 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
|||
2003-11-07 15:28 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* 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 <alexander@malmberg.org>
|
||||
|
||||
* Source/NSInputManager.m (-loadBindingsFromFile:): Handle errors
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue