Review request for 7122250: [macosx] mouseMoved Events test do not respond in JCK-runtime-7 interactive (original) (raw)

Alexander Potochkin Alexander.Potochkin at oracle.com
Fri Jan 27 10:15:52 PST 2012


Hello

This is not a real review request, it is more about looking for some good advice from Cocoa experts

http://cr.openjdk.java.net/~alexp/7122250/webrev.00/

For some reason java.awt.Window doesn't receive mouseEntered/mouseExited events in our JDK 7 for Mac. (It neither receive them in JDK 6 in some cases, but it is a different story)

JFrame works fine, the problem is only with java.awt.Window subclasses (the test case is attached - you can see that no mouseEntered/mouseExited events are received)

There is a clearTrackingRect() method called from AWTView.viewDidMoveToWindow which runs twice for JFrame, first with width and height equal to 1 and the next time with the actual size

for JWindow it is also called twice but with the initial 1x1 visible size

So looks like we need to call clearTrackingRect() at the moment the visible size is really changed. I checked that overriddensetFrameSize() method does the trick.

However it doesn't seem to be a good practice and it is also not clear why java.awt.Window is such a special case.

Any advice are welcome

Thanks and have a great weekend alexp -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bug448.java Url: http://mail.openjdk.java.net/pipermail/macosx-port-dev/attachments/20120127/ab2c1839/bug448.java



More information about the macosx-port-dev mailing list