Cocoa scrollbar tweak. NPOB.

This commit is contained in:
hyatt%netscape.com 2002-04-21 10:04:42 +00:00
parent 50b080e723
commit d60df2ea1b
2 changed files with 16 additions and 0 deletions

View File

@ -151,6 +151,9 @@ protected:
// tag for our mouse enter/exit tracking rect
NSTrackingRectTag mMouseEnterExitTag;
// used to avoid move re-entrancy
BOOL mInMove;
}
- (NSWindow*) getNativeWindow;

View File

@ -365,6 +365,13 @@ nsScrollbar::IsEnabled(PRBool *aState)
@implementation ScrollbarView
-(id)initWithFrame:(NSRect)aRect
{
mInMove = NO;
[super initWithFrame: aRect];
return self;
}
- (NSWindow*) getNativeWindow
{
NSWindow* currWin = [self window];
@ -416,6 +423,12 @@ nsScrollbar::IsEnabled(PRBool *aState)
- (void)mouseMoved:(NSEvent*)theEvent
{
// do nothing
if (mInMove)
return;
mInMove = YES;
[super mouseMoved: theEvent];
mInMove = NO;
}
@end