<AWT Dev> [11] Review Request: 8201364 [macosx] Component.getLocation() gives inconsistent coordinate for a component at (0, 0)

Dmitry Markov dmitry.markov at oracle.com
Thu May 17 18:35:00 UTC 2018



> On 17 May 2018, at 19:25, Sergey Bylokhov <Sergey.Bylokhov at oracle.com> wrote:
> 
> On 17/05/2018 02:05, Dmitry Markov wrote:
>> Hi Sergey,
>> According to your fix replacSurfaceData() and updateMinimumSize() are invoked only if the graphics device has been changed or the peer has been resized:
>>>  734         if (pResized || isNewDevice) {
>>>  735             replaceSurfaceData();
>>>  736             updateMinimumSize();
>>>  737         }
>> Shall we also check tResized in the statement above, (i.e. take into account changes in the target's size)?
> 
> Both of these methods bounds to the peer object(the size of NSWindow), and should be called when the peer is resized.
> - surfaceData should be updated because its size should be equal to the size of NSWindow.
> - updateMinimumSize should be called because it is depends on the MaxTextureHeight of the peer's LWGraphicsConfig

So if I got you right, it is not necessary to call these methods if the target has been resized. In other words we should NOT change the if-statement 
FROM:
if (pResized || isNewDevice) 
TO:
if (pResized || tResized || isNewDevice)
Is my understanding correct?

Thanks,
Dmitry
> 
> 
> -- 
> Best regards, Sergey.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20180517/7c66e098/attachment.html>


More information about the awt-dev mailing list