JDK-8214918 : Unify GraphicsEnvironment.getCenterPoint()/getMaximumWindowBounds() across the platforms
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 7u60,8u40,9,10,11,12
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris
  • CPU: generic
  • Submitted: 2018-12-06
  • Updated: 2019-02-14
  • Resolved: 2019-01-29
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 13
13 b08Fixed
Related Reports
Relates :  
Sub Tasks
JDK-8218009 :  
Description
In the fix for JDK-8076313 I need to implement possibility of switch between xinerama and non-xinerama modes at runtime. As a separate part I would like to investigate the usage of X11GraphicsEnvironment.runningXinerama() and replace it by some other generic for single/multi-screen solution.

This bug is about one of the place where the flag above is used.

In jdk 1.4 two new methods were added to the GraphicsEnvironment class:
 - getCenterPoint()
 - getMaximumWindowBounds() 
see https://docs.oracle.com/javase/7/docs/technotes/guides/awt/1.4/AWTChanges.html#windowCentering

Take a look to this descriptions from the link above:
"X-Window, Xinerama
All monitors share a single virtual coordinate space, as on Microsoft Windows. However, it is possible for the user to specify through X resources where windows should be centered. If these resources are set, getCenterPoint reflects their value. Otherwise, it returns the point at the center of the virtual coordinate space. (In practice, this will almost always be set - CDE sets it by default.)"

Since the case above was implemented on the Solaris, and uses an extension of the xinerama, I suggest to remove this and align implementation across the platforms:
 - getCenterPoint returns the coordinates of the center of the primary display for all platforms
 - getMaximumWindowBounds returns the bounds of the primary display minus display insets for all platforms