< prev index next >

src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m

Print this page

        

*** 168,181 **** --- 168,197 ---- self = [super initWithFrame:NSMakeRect(0, 0, 1, 1)]; [self setTrayIcon: theTrayIcon]; isHighlighted = NO; image = nil; + [self addTrackingArea]; return self; } + - (void)addTrackingArea { + if (trackingArea) { + [self removeTrackingArea:trackingArea]; + } + + NSTrackingAreaOptions options = NSTrackingMouseMoved | + NSTrackingInVisibleRect | + NSTrackingActiveAlways; + trackingArea = [[NSTrackingArea alloc] initWithRect: CGRectZero + options: options + owner: self + userInfo: nil]; + [self addTrackingArea:trackingArea]; + } + -(void) dealloc { [image release]; [super dealloc]; }
*** 266,275 **** --- 282,295 ---- - (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 >