Details
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8262516 | 11-pool | Suman Rajkumaar Kodandarama | P3 | Open | Unresolved |
Description
JDK 9, JDK 8u40, JDK 7u76
ADDITIONAL OS VERSION INFORMATION :
Ubuntu 14.04 OS
A DESCRIPTION OF THE PROBLEM :
On Linux OS the method "java.awt.GraphicsEnvironment.getScreenDevices()" returns wrong number of "java.awt.GraphicsDevice" objects after an additional monitor is plugged in or plugged out.
For example, on the system with two monitors the attached test case produces the following output.
Scenario #1 – The additional monitor is plugged out:
These monitors correctly recognized when Java started:
:0.0 1280x1024 0,0/1280x1024
:0.1 1920x1200 1280,0/1920x1200
But after plugging out the monitor Java returns wrong array:
:0.0 1280x1024 0,0/1280x1024 <-- this one actually does not exist
:0.1 1920x1200 1280,0/1920x1200
Scenario #2 – The additional monitor is plugged in:
Default monitor correctly recognized when Java started:
:0.0 1920x1200 0,0/1920x1200
But after plugging in the monitor Java returns wrong array:
:0.0 1280x1024 0,0/3200x1200 <-- 2 screens joined into 1 pseudo-screen
The issue is not reproducible on OS X and MS Windows OS.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Scenario #1:
1. Plug in the additional monitor.
2. Compile and run the test case attached to the bug as "GetScreenDevicesReturnsIncorrectResult.java" file with JDK to be tested.
3. In the test case window click "LOG" button and verify that all monitors available in the OS became listed in the test case window.
4. Plug out the additional monitor.
5. In the test case window click "LOG" button. The bug is reproduced, if the plugged out monitor still became listed in the test case window.
Scenario #2:
1. Plug out the additional monitor.
2. Compile and run the test case attached to the bug as "GetScreenDevicesReturnsIncorrectResult.java" file with JDK to be tested.
3. In the test case window click "LOG" button and verify that the plugged out monitor did not become listed in the test case window.
4. Plug in the additional monitor.
5. In the test case window click "LOG" button. The bug is reproduced, if the plugged in monitor still did not become listed in the test case window.
Attachments
Issue Links
- backported by
-
JDK-8262516 GraphicsEnvironment does not detect changes in count of monitors on Linux OS
- Open
- relates to
-
JDK-8222789 Replace the usage of "Sun's Xinerama API" by the "XFree86's Xinerama API" on Solaris
- Resolved
-
JDK-8238936 The crash in XRobotPeer when the custom GraphicsDevice is used
- Resolved
-
JDK-8239583 [AIX] simplify the native references in X input methods
- Resolved
-
JDK-8280468 Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux
- Resolved
-
JDK-8220320 Remove unused old code in GraphicsEnvironment on unix
- Resolved
-
JDK-8239819 XToolkit: Misread of screen information memory
- Resolved
-
JDK-8240290 Clean the "libawt_xawt" library from code for macOS
- Resolved
-
JDK-8223045 GraphicsEnvironment does not detect resolution changes in multiscreen systems
- Resolved
-
JDK-8239894 Xserver crashes when the wrong high refresh rate is used
- Resolved
-
JDK-8288854 getLocalGraphicsEnvironment() on for multi-screen setups throws exception NPE
- Resolved
-
JDK-8214076 Cleanup the code related to GraphicsEnvironment/Device/Configuration
- Resolved
-
JDK-8214918 Unify GraphicsEnvironment.getCenterPoint()/getMaximumWindowBounds() across the platforms
- Resolved
-
JDK-8252349 Delete the "sun.awt.X11.checkSTRUT" property
- Resolved