<AWT Dev> [10] JDK-8190326: Robot.mouseMove uses scaling factor of main display on unscaled second display

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Mon Nov 6 20:38:38 UTC 2017


Hi, Shashi
I think that the logic of how we use {x,y} coordinates in the users 
space and how we convert them to device space should be similar for 
robots API like mouseMove/getPixelColor/createScreenCapture and 
Window.setBounds().
So it will be good to use the similar java code instaed of native code 
for these cases, see WWindowPeer.setBounds()

ps: It seems that webrev contains a part of the fix from 8148344.


On 05/11/2017 21:34, Shashidhara Veerabhadraiah wrote:
> Hi, Please review a fix for the below bug.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8190326
> 
> Webrev: http://cr.openjdk.java.net/~sveerabhadra/8190326/webrev.00/
> 
> (Please see from line no.83-87 for awt_Robot.cpp review and ignore other 
> lines as they are under review for another bug)
> 
> Summary: Robot cursor move used to apply the primary monitor’s scaling 
> factor to derive device coordinates even though there was move requested 
> to another monitor having a different scaling factor. Now this is 
> changed to use the logical point’s monitor scaling factor to which it 
> may be moved to.
> 
> Thanks and regards,
> 
> Shashi
> 


-- 
Best regards, Sergey.


More information about the awt-dev mailing list