diff --git a/macosx/BarButton.h b/macosx/BarButton.h index 4294599d4..b61d53820 100644 --- a/macosx/BarButton.h +++ b/macosx/BarButton.h @@ -31,6 +31,8 @@ NSString * fPrefString, * fPrefKey; BOOL fEnabled; + + NSTrackingRectTag trackingTag; } - (void) setText: (NSString *) text; diff --git a/macosx/BarButton.m b/macosx/BarButton.m index abd707172..51d565f12 100644 --- a/macosx/BarButton.m +++ b/macosx/BarButton.m @@ -67,7 +67,7 @@ - (void) awakeFromNib { - [self addTrackingRect: [self bounds] owner: self userData: nil assumeInside: NO]; + trackingTag = [self addTrackingRect: [self bounds] owner: self userData: nil assumeInside: NO]; } - (void) dealloc @@ -160,6 +160,7 @@ - (void) resetBounds: (NSNotification *) notification { + [self removeTrackingRect: trackingTag]; [self addTrackingRect: [self bounds] owner: self userData: nil assumeInside: NO]; }