<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello, Leonid, Alexander.<div><br></div><div>Artem told me that I could ask you for the second review on this fix. Could you please have a look?</div><div><br></div><div>For your convenience:&nbsp;</div><div><a href="http://bugs.sun.com/view_bug.do?bug_id=8005405">http://bugs.sun.com/view_bug.do?bug_id=8005405</a><br>The fix is available at:<br><a href="http://cr.openjdk.java.net/~pchelko/8005405/webrev.02/">http://cr.openjdk.java.net/~pchelko/8005405/webrev.02/</a><br><div><br></div><div>Thank you.</div><div>With best regards. Petr.</div><div><br><div><div>On Jan 25, 2013, at 1:56 PM, Sergey Bylokhov wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi, Petr.<br>Fix looks good.<br><br>25.01.2013 12:39, Petr Pchelko wrote:<br><blockquote type="cite">Hello, AWT Team.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Sorry for this mess with updates, please review the updated fix for the issue:<br></blockquote><blockquote type="cite"><a href="http://bugs.sun.com/view_bug.do?bug_id=8005405">http://bugs.sun.com/view_bug.do?bug_id=8005405</a><br></blockquote><blockquote type="cite">The new version is available at:<br></blockquote><blockquote type="cite"><a href="http://cr.openjdk.java.net/~pchelko/8005405/webrev.02/">http://cr.openjdk.java.net/~pchelko/8005405/webrev.02/</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">As Sergey noticed there was a bug in the previous version: the getParent method could return an owner of the window an coordinates would be computed incorrectly. In the updated version this issue is solved and the code is further simplified.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thank you.<br></blockquote><blockquote type="cite">With best regards. Petr.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Jan 24, 2013, at 7:35 PM, Petr Pchelko wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Hello, AWT Team.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Please, review an updated fix for:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://bugs.sun.com/view_bug.do?bug_id=8005405">http://bugs.sun.com/view_bug.do?bug_id=8005405</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">at<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://cr.openjdk.java.net/~pchelko/8005405/webrev.01/">http://cr.openjdk.java.net/~pchelko/8005405/webrev.01/</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Sergey suggested to simplify the loop which computes the component offset. I simplified it and deleted the check that a peer is an instance of LWComponentPeer because as I understand it is always true for a root component in the hierarchy on the mac.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">The updated fix is tested on toy apps and on netbeans.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">With best regards, Petr.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">On Jan 23, 2013, at 6:35 PM, Petr Pchelko wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Hello, AWT team.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Please, review the fix for the issue<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="http://bugs.sun.com/view_bug.do?bug_id=8005405">http://bugs.sun.com/view_bug.do?bug_id=8005405</a><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">The fix is available at:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="http://cr.openjdk.java.net/~pchelko/8005405/webrev.00/">http://cr.openjdk.java.net/~pchelko/8005405/webrev.00/</a><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">2 problem existed:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>1. Calculation of the dragOrigin and componentOffset relied on the component.isLightweight() method, which considers all the AWT components heavyweight on Mac, however we really wanted there to find the component which has a real NSView or NSWindow under it. Replacing it with instanceof Window solves the problem.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>2. On the native level the dragOrigin and location of the dragEvent were calculated without respect to the fact than Cocoa coordinate system is flipped.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">The fix is tested on toy apps with both AWT and Swing components. Also I have run netbeans on the JDK with this fix and all drag images look good.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">With best regards. Petr.<br></blockquote></blockquote></blockquote><br><br>-- <br>Best regards, Sergey.<br><br></div></blockquote></div><br></div></div></body></html>