JDK-8034224 : Wrong maximum bounds for dual screen configuration on Ubuntu
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7u51
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux_ubuntu
  • CPU: x86_64
  • Submitted: 2014-02-09
  • Updated: 2014-11-14
  • Resolved: 2014-02-12
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 7
7-poolResolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Linux kendzi-pc 3.11.0-15-generic #25-Ubuntu SMP Thu Jan 30 17:22:01 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


EXTRA RELEVANT SYSTEM CONFIGURATION :
I have Ubuntu with Unit and two screens with resolutions: 1920x1080 and 1280x1024.


A DESCRIPTION OF THE PROBLEM :
Some application try to setup windows size using that method
GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds()
But on my computer java7 give wrong result:
java.awt.Rectangle[x=3905,y=24,width=-705,height=1000]

It seems that x and width values are complicity wrong.

Same call with java6 give wrong, but better result:
java.awt.Rectangle[x=1920,y=0,width=1280,height=1024]




STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run Ubuntu with dual screens  
2. call method GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds()


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I'm expect to get 
java.awt.Rectangle[x=0,y=24,width=3200,height=1000]

ACTUAL -
But currently I get:
java.awt.Rectangle[x=3905,y=24,width=-705,height=1000]

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
public static void main(String[] args) {
    System.out.println(GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds());

}
---------- END SOURCE ----------


Comments
Incorrectly calculated screen insets leads to this issue, it was fixed recently in JDK-8020443.
12-02-2014

- please evaluate - what is the earliest affected release?
12-02-2014