< prev index next >
src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java
Print this page
*** 282,292 ****
/**
* Returns true only if:
* - the Xrandr extension is present
* - the necessary Xrandr functions were loaded successfully
- * - XINERAMA is not enabled
*/
private static synchronized boolean isXrandrExtensionSupported() {
if (xrandrExtSupported == null) {
xrandrExtSupported =
Boolean.valueOf(initXrandrExtension());
--- 282,291 ----
*** 314,324 ****
return fsAvailable;
}
@Override
public boolean isDisplayChangeSupported() {
! return (isFullScreenSupported() && (getFullScreenWindow() != null));
}
private static void enterFullScreenExclusive(Window w) {
X11ComponentPeer peer = AWTAccessor.getComponentAccessor().getPeer(w);
if (peer != null) {
--- 313,325 ----
return fsAvailable;
}
@Override
public boolean isDisplayChangeSupported() {
! return (isFullScreenSupported()
! && !((X11GraphicsEnvironment) GraphicsEnvironment
! .getLocalGraphicsEnvironment()).runningXinerama());
}
private static void enterFullScreenExclusive(Window w) {
X11ComponentPeer peer = AWTAccessor.getComponentAccessor().getPeer(w);
if (peer != null) {
*** 344,355 ****
--- 345,358 ----
boolean fsSupported = isFullScreenSupported();
if (fsSupported && old != null) {
// enter windowed mode (and restore original display mode)
exitFullScreenExclusive(old);
+ if (isDisplayChangeSupported()) {
setDisplayMode(origDisplayMode);
}
+ }
super.setFullScreenWindow(w);
if (fsSupported && w != null) {
// save original display mode
*** 426,437 ****
--- 429,442 ----
PrivilegedAction<Void> a = () -> {
Runnable r = () -> {
Window old = getFullScreenWindow();
if (old != null) {
exitFullScreenExclusive(old);
+ if (isDisplayChangeSupported()) {
setDisplayMode(origDisplayMode);
}
+ }
};
String name = "Display-Change-Shutdown-Thread-" + screen;
Thread t;
if (System.getSecurityManager() == null) {
t = new Thread(ThreadGroupUtils.getRootThreadGroup(), r, name);
< prev index next >