/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 5041219
* @bug 5101561
* @bug 5035272
* @bug 5096011
* @bug 5101712
* @bug 5098624
* @summary Here are a few assertions worth verification:
* - the fullscreen window is positioned at 0,0
* - the fs window appears on the correct screen
* - if the exclusive FS mode is supported, no other widndow should
* overlap the fs window (including the taskbar).
* You could, however, alt+tab out of a fullscreen window, or at least
* minimize it (if you've entered the fs mode with a Window, you'll need
* to minimize the owner frame).
* Note that there may be issues with FS exclusive mode with ddraw and
* multiple fullscreen windows (one per device).
* - if display mode is supported that it did change
* - that the original display mode is restored once
* the ws window is disposed
* All of the above should work with and w/o DirectDraw
* (-Dsun.java2d.noddraw=true) on windows, and w/ and w/o opengl on X11
* (-Dsun.java2d.opengl=True).
*/
/**
*/
private static boolean dmChange = false;
static boolean setNullOnDispose = false;
static boolean useFSFrame = true;
static boolean useFSWindow = false;
static boolean useFSDialog = false;
static boolean useBS = false;
static boolean runRenderLoop = false;
static boolean addHWChildren = false;
static volatile boolean done = true;
super(title);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
}
});
int num = 0;
Button b;
} else {
}
b.addActionListener(this);
p.add(b);
num++;
}
add("South", p);
public void itemStateChanged(ItemEvent e) {
}
});
// cb = new Checkbox("Exit FS on window dispose");
// cb.addItemListener(new ItemListener() {
// public void itemStateChanged(ItemEvent e) {
// setNullOnDispose = ((Checkbox)e.getSource()).getState();
// }
// });
// p1.add(cb);
public void itemStateChanged(ItemEvent e) {
useFSFrame = true;
useFSWindow = false;
useFSDialog = false;
}
});
public void itemStateChanged(ItemEvent e) {
useFSFrame = false;
useFSWindow = true;
useFSDialog = false;
}
});
public void itemStateChanged(ItemEvent e) {
useFSFrame = false;
useFSWindow = false;
useFSDialog = true;
}
});
public void itemStateChanged(ItemEvent e) {
}
});
public void itemStateChanged(ItemEvent e) {
}
});
public void itemStateChanged(ItemEvent e) {
}
});
pack();
setVisible(true);
}
g.setFont(f);
rectStrBounds = g.getFontMetrics().
rectStrBounds = g.getFontMetrics().
rectStrBounds = g.getFontMetrics().
rectStrBounds = g.getFontMetrics().
rectStrBounds = g.getFontMetrics().
}
if (useFSWindow) {
renderDimensions(g, getBounds(),
this.getGraphicsConfiguration());
}
};
} else if (useFSDialog) {
renderDimensions(g, getBounds(),
this.getGraphicsConfiguration());
}
});
} else {
{
renderDimensions(g, getBounds(),
this.getGraphicsConfiguration());
}
};
if (addHWChildren) {
}
});
}
}
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() > 1) {
done = true;
}
}
});
{
break;
}
}
"Hz on device" + dev);
} else {
}
}
done = false;
if (runRenderLoop) {
public void run() {
if (useBS) {
}
while (!done) {
if (useBS) {
} else {
}
try {
} catch (InterruptedException e) {}
}
if (useBS) {
}
}
});
}
}
if (s.equalsIgnoreCase("-dm")) {
dmChange = true;
} else if (s.equalsIgnoreCase("-usewindow")) {
useFSWindow = true;
} else if (s.equalsIgnoreCase("-setnull")) {
setNullOnDispose = true;
} else {
"[-dm][-usewindow][-setnull]");
}
}
new MultimonFullscreenTest("Test Full Screen");
}
done = true;
if (setNullOnDispose) {
}
w.dispose();
}
}
}