< prev index next >
src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m
Print this page
*** 168,183 ****
--- 168,198 ----
self = [super initWithFrame:NSMakeRect(0, 0, 1, 1)];
[self setTrayIcon: theTrayIcon];
isHighlighted = NO;
image = nil;
+ trackingArea = nil;
+
+ [self addTrackingArea];
return self;
}
+ - (void)addTrackingArea {
+ NSTrackingAreaOptions options = NSTrackingMouseMoved |
+ NSTrackingInVisibleRect |
+ NSTrackingActiveAlways;
+ trackingArea = [[NSTrackingArea alloc] initWithRect: CGRectZero
+ options: options
+ owner: self
+ userInfo: nil];
+ [self addTrackingArea:trackingArea];
+ }
+
-(void) dealloc {
[image release];
+ [trackingArea release];
[super dealloc];
}
- (void)setHighlighted:(BOOL)aFlag
{
*** 266,275 ****
--- 281,294 ----
- (void) mouseDragged:(NSEvent *)event {
[trayIcon deliverJavaMouseEvent: event];
}
+ - (void) mouseMoved: (NSEvent *)event {
+ [trayIcon deliverJavaMouseEvent: event];
+ }
+
- (void) rightMouseDown:(NSEvent *)event {
[trayIcon deliverJavaMouseEvent: event];
}
- (void) rightMouseUp:(NSEvent *)event {
< prev index next >