i am developing an application which uses an awt frame in full-screen exclusive mode. Everythings works fine until a windows popup gets visible. This will steal the focus and my application will be minimized.
Here is my init code of the frame:
if (ApplicationConfig.getInstance().useFullscreenMode()) {
frame.setUndecorated(true);
frame.setResizable(false);
if (monitor.isFullScreenSupported()) {
monitor.setFullScreenWindow(frame);
if (monitor.isDisplayChangeSupported()) {
DisplayMode defaultMode = new DisplayMode(
(int) appDimension.getWidth(),
(int) appDimension.getHeight(),
32,
DisplayMode.REFRESH_RATE_UNKNOWN);
monitor.setDisplayMode(defaultMode);
frame.setFulscreenDisplayMode(defaultMode);
DisplayMode selectedMode = monitor.getDisplayMode();
log.debug("Setting fullscreen display mode to " + selectedMode.getWidth() + "x" + selectedMode.getHeight() +
" color depth: " + selectedMode.getBitDepth() + " refresh rate: " + selectedMode.getRefreshRate());
} else {
log.error("Change display mode not supported");
}
} else {
log.error("Full screen not supported");
}
}
Is there a workaround or setting to avoid this?