--- old/src/macosx/native/sun/awt/AWTView.m 2012-04-18 18:48:39.000000000 +0400 +++ new/src/macosx/native/sun/awt/AWTView.m 2012-04-18 18:48:39.000000000 +0400 @@ -61,6 +61,7 @@ @synthesize _dropTarget; @synthesize _dragSource; @synthesize cglLayer; +@synthesize mouseIsOver; // Note: Must be called on main (AppKit) thread only - (id) initWithRect: (NSRect) rect @@ -299,6 +300,16 @@ */ -(void) deliverJavaMouseEvent: (NSEvent *) event { + + NSEventType type = [event type]; + + // check synthesized mouse entered/exited events + if((type == NSMouseEntered && mouseIsOver) || (type == NSMouseExited && !mouseIsOver)){ + return; + }else if((type == NSMouseEntered && !mouseIsOver) || (type == NSMouseExited && mouseIsOver)){ + mouseIsOver = !mouseIsOver; + } + [AWTToolkit eventCountPlusPlus]; JNIEnv *env = [ThreadUtilities getJNIEnv]; @@ -306,7 +317,6 @@ NSPoint eventLocation = [event locationInWindow]; NSPoint localPoint = [self convertPoint: eventLocation fromView: nil]; NSPoint absP = [NSEvent mouseLocation]; - NSEventType type = [event type]; // Convert global numbers between Cocoa's coordinate system and Java. // TODO: need consitent way for doing that both with global as well as with local coordinates.