Friendly Jira Robot created ERT-755:
---------------------------------------
Summary: Device#getDPI method can return incorrect values [EBZ#545953]
Key: ERT-755
URL:
https://issues.jboss.org/browse/ERT-755
Project: Eclipse Release Train
Issue Type: Task
Components: Platform
Reporter: Friendly Jira Robot
Since the fix for Bug 535064 there is an issue with Device#getDPI method that can under
some unclear conditions return an incorrect DPI. Since my comment in the original bug went
unnoticed I'm creating a new bug to raise this issue.
Here's my comment in the original bug:
I'm noticing a strange behavior of Device#getScreenDPI on my system (Ubuntu 18.04 with
latest updates, and GTK version 3.22.30). The returned DPI value is {102, 102} instead of
{96,96} as it should be. I've tried to debug the issue and here are the values used
for DPI calculation:
widthMM=480,scaleFactor=1,monitorGeometry={0, 0, 1920, 1080}
This gives 254*1920/(480*10.0) = 101.6, value then rounded to 102.
I've tried to reproduce this issue with VirtualBox with a clean 18.04 install but
couldn't. Although it's the same system, returned widthMM is different:
widthMM=503,scaleFactor=1,monitorGeometry={0, 0, 1920, 988}
Which gives 254*1920/(503*10.0) = 96.0, which is correct.
Is this a bug? Running $ xrandr --query gives
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
VGA-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 480mm x
270mm
So the 480mm value is there, but I am not sure what this means. The result is that Eclipse
4.9 and onward return and incorrect DPI value on my system.
"xrdb -query | grep dpi" gives the correct DPI as follows:
Xft.dpi: 96
--
This message was sent by Atlassian Jira
(v7.13.5#713005)