Re: [9] Review request for 8142966 Wrong cursor position in text components on HiDPI display

2016-05-31 Thread Alexandr Scherbatiy
On 6/1/2016 12:26 AM, Phil Race wrote: On 5/31/2016 1:36 PM, Alexandr Scherbatiy wrote: On 5/31/2016 10:54 PM, Phil Race wrote: This looks reasonable except I am not sure when gc would be null here :- 1062 private static FontRenderContext getFRCProperty(JComponent c) { 1063 i

Re: [9] Review request for 8142966 Wrong cursor position in text components on HiDPI display

2016-05-31 Thread Phil Race
On 5/31/2016 1:36 PM, Alexandr Scherbatiy wrote: On 5/31/2016 10:54 PM, Phil Race wrote: This looks reasonable except I am not sure when gc would be null here :- 1062 private static FontRenderContext getFRCProperty(JComponent c) { 1063 if (c != null) { 1064 1065 Graphi

Re: [9] Review request for 8142966 Wrong cursor position in text components on HiDPI display

2016-05-31 Thread Alexandr Scherbatiy
On 5/31/2016 10:54 PM, Phil Race wrote: This looks reasonable except I am not sure when gc would be null here :- 1062 private static FontRenderContext getFRCProperty(JComponent c) { 1063 if (c != null) { 1064 1065 GraphicsConfiguration gc = c.getGraphicsConfiguration();

Re: [9] Review request for 8142966 Wrong cursor position in text components on HiDPI display

2016-05-31 Thread Phil Race
This looks reasonable except I am not sure when gc would be null here :- 1062 private static FontRenderContext getFRCProperty(JComponent c) { 1063 if (c != null) { 1064 1065 GraphicsConfiguration gc = c.getGraphicsConfiguration(); 1066 AffineTransform tx = (g

Re: [9] Review request for 8142966 Wrong cursor position in text components on HiDPI display

2016-05-10 Thread Sergey Bylokhov
On 10.05.16 9:54, Alexandr Scherbatiy wrote: If a backbuffer has scale 1 on HiDPI display it will show a blurry text and some other artifacts like that. I believe it should have HiDPI scale. The fix only aligns the Swing font rendering context with the same transform scale. It will be blu

Re: [9] Review request for 8142966 Wrong cursor position in text components on HiDPI display

2016-05-09 Thread Alexandr Scherbatiy
On 5/5/2016 2:24 PM, Sergey Bylokhov wrote: On 05.05.16 14:11, Alexandr Scherbatiy wrote: Note that the component GConfig is not necessary the config which is used in drawing, and can be different from the GConfig of Graphics passed to the paint() method. This is still necessary change for

Re: [9] Review request for 8142966 Wrong cursor position in text components on HiDPI display

2016-05-05 Thread Sergey Bylokhov
On 05.05.16 14:11, Alexandr Scherbatiy wrote: Note that the component GConfig is not necessary the config which is used in drawing, and can be different from the GConfig of Graphics passed to the paint() method. This is still necessary change for the components size calculation where graphic

Re: [9] Review request for 8142966 Wrong cursor position in text components on HiDPI display

2016-05-05 Thread Alexandr Scherbatiy
On 5/5/2016 12:55 PM, Sergey Bylokhov wrote: On 05.05.16 8:42, Alexandr Scherbatiy wrote: Could you review the fix: bug: https://bugs.openjdk.java.net/browse/JDK-8142966 webrev: http://cr.openjdk.java.net/~alexsch/8142966/webrev.02 This is the initial fix where graphics configuration t

Re: [9] Review request for 8142966 Wrong cursor position in text components on HiDPI display

2016-05-05 Thread Sergey Bylokhov
On 05.05.16 8:42, Alexandr Scherbatiy wrote: Could you review the fix: bug: https://bugs.openjdk.java.net/browse/JDK-8142966 webrev: http://cr.openjdk.java.net/~alexsch/8142966/webrev.02 This is the initial fix where graphics configuration transform is included into the Swing font render

[9] Review request for 8142966 Wrong cursor position in text components on HiDPI display

2016-05-04 Thread Alexandr Scherbatiy
Hello, Could you review the fix: bug: https://bugs.openjdk.java.net/browse/JDK-8142966 webrev: http://cr.openjdk.java.net/~alexsch/8142966/webrev.02 Swing uses a font rendering context which does not take the graphics configuration transform into account. This lead to the situation whe