mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
Cocoa scrollbar tweak. NPOB.
This commit is contained in:
parent
50b080e723
commit
d60df2ea1b
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user