JDK-8149115 : [hidpi] Linux: display-wise scaling factor should probably be taken into account
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2016-02-05
  • Updated: 2016-08-08
  • Resolved: 2016-07-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b130Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
For now to enable HiDPI support on Linux for java apps, the GDK_SCALE factor should be set.

But this approach has some seeming drawbacks:
1. it works for both HiDPI and non-HiDPI displays and must be set by the user explicitly
2. it is seemingly not display-wise in case of multi-display machine configuration
3. it ignores scaling factor settings (CL for GNOME, or, e.g., for Ubuntu 15.04, scaling rules in "Display" settings which are individual for each display in the system) whereas native apps do respect them. (it also ignores display resolution settings)

So it is desirable that use of, e.g., Ubuntu display scale changes will affect the size of java application components.

It is also desirable to select the resolution variant for a multiresolution image if the scale changed (for now the only way to select it is seemingly to set GDK_SCALE before the application run, and the user always see 1x or 2x variant regardless of the real display HiDPI capabilities) - please see comments to JDK-8147557.

Ideally, the multi-resolution image should automatically adjust the resolution variant for HiDPI/non-HiDPI display (as it works for Windows and OS X now), not delegate this to the user (if it is possible, of course).

Comments
GDK_SCALE is not used in Unity and Gnome3 DE.
05-07-2016