src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 327,337 **** public boolean isFullScreenSupported() { return isFSExclusiveModeAllowed(); } @Override - @SuppressWarnings("deprecation") public synchronized void setFullScreenWindow(Window w) { Window old = getFullScreenWindow(); if (w == old) { return; } --- 327,336 ----
*** 351,361 **** // the desktop properties dialog, for example), so // we need to record it every time prior to // entering the fullscreen mode. defaultDisplayMode = null; } ! WWindowPeer peer = (WWindowPeer)old.getPeer(); if (peer != null) { peer.setFullScreenExclusiveModeState(false); // we used to destroy the buffers on exiting fs mode, this // is no longer needed since fs change will cause a surface // data replacement --- 350,360 ---- // the desktop properties dialog, for example), so // we need to record it every time prior to // entering the fullscreen mode. defaultDisplayMode = null; } ! WWindowPeer peer = AWTAccessor.getComponentAccessor().getPeer(old); if (peer != null) { peer.setFullScreenExclusiveModeState(false); // we used to destroy the buffers on exiting fs mode, this // is no longer needed since fs change will cause a surface // data replacement
*** 370,380 **** // always record the default display mode prior to going // fullscreen defaultDisplayMode = getDisplayMode(); addFSWindowListener(w); // Enter full screen exclusive mode. ! WWindowPeer peer = (WWindowPeer)w.getPeer(); if (peer != null) { synchronized(peer) { enterFullScreenExclusive(screen, peer); // Note: removed replaceSurfaceData() call because // changing the window size or making it visible --- 369,379 ---- // always record the default display mode prior to going // fullscreen defaultDisplayMode = getDisplayMode(); addFSWindowListener(w); // Enter full screen exclusive mode. ! WWindowPeer peer = AWTAccessor.getComponentAccessor().getPeer(w); if (peer != null) { synchronized(peer) { enterFullScreenExclusive(screen, peer); // Note: removed replaceSurfaceData() call because // changing the window size or making it visible
*** 403,413 **** public boolean isDisplayChangeSupported() { return (isFullScreenSupported() && getFullScreenWindow() != null); } @Override - @SuppressWarnings("deprecation") public synchronized void setDisplayMode(DisplayMode dm) { if (!isDisplayChangeSupported()) { super.setDisplayMode(dm); return; } --- 402,411 ----
*** 417,427 **** if (getDisplayMode().equals(dm)) { return; } Window w = getFullScreenWindow(); if (w != null) { ! WWindowPeer peer = (WWindowPeer)w.getPeer(); configDisplayMode(screen, peer, dm.getWidth(), dm.getHeight(), dm.getBitDepth(), dm.getRefreshRate()); // resize the fullscreen window to the dimensions of the new // display mode Rectangle screenBounds = getDefaultConfiguration().getBounds(); --- 415,425 ---- if (getDisplayMode().equals(dm)) { return; } Window w = getFullScreenWindow(); if (w != null) { ! WWindowPeer peer = AWTAccessor.getComponentAccessor().getPeer(w); configDisplayMode(screen, peer, dm.getWidth(), dm.getHeight(), dm.getBitDepth(), dm.getRefreshRate()); // resize the fullscreen window to the dimensions of the new // display mode Rectangle screenBounds = getDefaultConfiguration().getBounds();