jdk/src/share/classes/java/awt/GraphicsDevice.java
changeset 887 0aab8d3fa11a
parent 2 90ce3da70b43
child 888 c7009cf0001f
equal deleted inserted replaced
886:7eb22e81bb28 887:0aab8d3fa11a
     1 /*
     1 /*
     2  * Copyright 1997-2006 Sun Microsystems, Inc.  All Rights Reserved.
     2  * Copyright 1997-2008 Sun Microsystems Microsystems, Inc.  All Rights Reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Sun designates this
     7  * published by the Free Software Foundation.  Sun designates this
   234      * @see Component#setVisible
   234      * @see Component#setVisible
   235      * @since 1.4
   235      * @since 1.4
   236      */
   236      */
   237     public void setFullScreenWindow(Window w) {
   237     public void setFullScreenWindow(Window w) {
   238         if (fullScreenWindow != null && windowedModeBounds != null) {
   238         if (fullScreenWindow != null && windowedModeBounds != null) {
       
   239             // if the window went into fs mode before it was realized it may
       
   240             // have (0,0) dimensions
       
   241             if (windowedModeBounds.width  == 0) windowedModeBounds.width  = 1;
       
   242             if (windowedModeBounds.height == 0) windowedModeBounds.height = 1;
   239             fullScreenWindow.setBounds(windowedModeBounds);
   243             fullScreenWindow.setBounds(windowedModeBounds);
   240         }
   244         }
   241         // Set the full screen window
   245         // Set the full screen window
   242         synchronized (fsAppContextLock) {
   246         synchronized (fsAppContextLock) {
   243             // Associate fullscreen window with current AppContext
   247             // Associate fullscreen window with current AppContext