-
Enhancement
-
Resolution: Fixed
-
P3
-
7
-
b17
-
x86
-
linux
SYNOPSIS
--------
Java Statically Determines Display Size on Linux platforms
OPERATING SYSTEM
----------------
Linux (tested on RHEL)
JDK VERSION
-----------
Reproducible with JDK 6u25
Reproducible with JDK 7b142
PROBLEM DESCRIPTION
-------------------
java.awt.Toolkit provides a getScreenSize() method that returns a java.awt.Dimension. The width and height of that Dimension are always the desktop resolution at the time the JVM is started. If the resolution changes while the JVM is running, the values in Dimension returned from getScreenSize() do not change.
java.awt.DisplayMode exhibits similar behavior. It provides a getWidth() method and getHeight() and the values do not change after a desktop resolution change.
REPRODUCTION INSTRUCTIONS
-------------------------
Testcases are attached.
Example Problem 1:
1. javac -d popup *.java
2. java popup.GE
3. Click 'Print Graphics info' to display current java graphics
information including display width and height.
4. Change dispaly screen resolution.
5. Click 'Print Graphics info'again. It can be noticed that the graphics
information displayed are not having updated display width and
height.
Example Problem 2:
1. Change screen resolution to some lower value (say 1920x1200)
2. java popup.GE
3. PopupTest displays another window with a button. The button will
display a JPopupMenu above the button when clicked.
4. Change screen resolution to some higher value (say 5760x1200).
5. Move the window past 1920, then click the button again. The popup
menu wont paint past 1920 so it appears to float to the left of the
window.
--------
Java Statically Determines Display Size on Linux platforms
OPERATING SYSTEM
----------------
Linux (tested on RHEL)
JDK VERSION
-----------
Reproducible with JDK 6u25
Reproducible with JDK 7b142
PROBLEM DESCRIPTION
-------------------
java.awt.Toolkit provides a getScreenSize() method that returns a java.awt.Dimension. The width and height of that Dimension are always the desktop resolution at the time the JVM is started. If the resolution changes while the JVM is running, the values in Dimension returned from getScreenSize() do not change.
java.awt.DisplayMode exhibits similar behavior. It provides a getWidth() method and getHeight() and the values do not change after a desktop resolution change.
REPRODUCTION INSTRUCTIONS
-------------------------
Testcases are attached.
Example Problem 1:
1. javac -d popup *.java
2. java popup.GE
3. Click 'Print Graphics info' to display current java graphics
information including display width and height.
4. Change dispaly screen resolution.
5. Click 'Print Graphics info'again. It can be noticed that the graphics
information displayed are not having updated display width and
height.
Example Problem 2:
1. Change screen resolution to some lower value (say 1920x1200)
2. java popup.GE
3. PopupTest displays another window with a button. The button will
display a JPopupMenu above the button when clicked.
4. Change screen resolution to some higher value (say 5760x1200).
5. Move the window past 1920, then click the button again. The popup
menu wont paint past 1920 so it appears to float to the left of the
window.
- relates to
-
JDK-8041654 OutOfMemoryError: RepaintManager doesn't clean up cache of volatile images
-
- Resolved
-
-
JDK-8001463 Regression : Deadlock between AWT-XAWT thread and AWT-EventQueue-0 Thread when screen resolution changes
-
- Closed
-
-
JDK-8022810 Cannot list all the available display modes on Ubuntu linux in case of two screen devices
-
- Resolved
-