7145508: java.awt.GraphicsDevice.get/setDisplayMode behavior is incorrect when no display is present
Reviewed-by: serb, bae
This commit is contained in:
parent
6230465f95
commit
4c0f9a1943
@ -380,7 +380,11 @@ public class X11GraphicsDevice
|
||||
@Override
|
||||
public synchronized DisplayMode getDisplayMode() {
|
||||
if (isFullScreenSupported()) {
|
||||
return getCurrentDisplayMode(screen);
|
||||
DisplayMode mode = getCurrentDisplayMode(screen);
|
||||
if (mode == null) {
|
||||
mode = getDefaultDisplayMode();
|
||||
}
|
||||
return mode;
|
||||
} else {
|
||||
if (origDisplayMode == null) {
|
||||
origDisplayMode = getDefaultDisplayMode();
|
||||
|
Loading…
x
Reference in New Issue
Block a user