src/macosx/classes/sun/awt/CGraphicsDevice.java

Print this page

        

*** 46,55 **** --- 46,58 ---- // Default config (temporarily hard coded) private final int DEFAULT_CONFIG = 0; private static AWTPermission fullScreenExclusivePermission; + // Save/restore DisplayMode for the Full Screen mode + private DisplayMode originalMode; + public CGraphicsDevice(int displayID) { this.displayID = displayID; configs = new GraphicsConfiguration[] { CGLGraphicsConfig.getConfig(this, 0) };
*** 122,143 **** if (w == old) { return; } boolean fsSupported = isFullScreenSupported(); if (fsSupported && old != null) { // enter windowed mode (and restore original display mode) exitFullScreenExclusive(old); ! ! // TODO: restore display mode } super.setFullScreenWindow(w); if (fsSupported && w != null) { ! // TODO: save current display mode ! // enter fullscreen mode enterFullScreenExclusive(w); } } --- 125,150 ---- if (w == old) { return; } boolean fsSupported = isFullScreenSupported(); + if (fsSupported && old != null) { // enter windowed mode (and restore original display mode) exitFullScreenExclusive(old); ! if (originalMode != null) { ! setDisplayMode(originalMode); ! originalMode = null; ! } } super.setFullScreenWindow(w); if (fsSupported && w != null) { ! if (isDisplayChangeSupported()) { ! originalMode = getDisplayMode(); ! } // enter fullscreen mode enterFullScreenExclusive(w); } }