Mac OS X: Work around AWT shifting the fullscreen window off the screen

This commit is contained in:
Elias Naur 2004-11-16 13:21:46 +00:00
parent f65ae73d47
commit 45607a7c69
3 changed files with 18 additions and 2 deletions

View file

@ -77,6 +77,7 @@ final class MacOSXDisplay implements DisplayImplementation {
}
public void createWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException {
hideUI(fullscreen);
close_requested = false;
try {
frame = new MacOSXFrame(mode, requested_mode, fullscreen, x, y);
@ -98,6 +99,7 @@ final class MacOSXDisplay implements DisplayImplementation {
setView(null);
frame.syncDispose();
frame = null;
hideUI(false);
}
public int getGammaRampLength() {
@ -222,6 +224,13 @@ final class MacOSXDisplay implements DisplayImplementation {
}
}
/**
* This is an interface to the native Carbon call
* SetSystemUIMode. It is used to hide the dock in a way
* that will prevent AWT from shifting the fullscreen window
*/
private native void hideUI(boolean hide);
native void getMouseDeltas(IntBuffer delta_buffer);
private native void updateContext();