Fix for Linux fullscreen mode problem with Compiz (http://lwjgl.org/forum/index.php/topic,3335.0.html)

This commit is contained in:
Ioannis Tsakpinis 2010-07-04 17:14:33 +00:00
parent 1cdef6606b
commit e0bfcca323
3 changed files with 8 additions and 1 deletions

View File

@ -158,6 +158,7 @@ final class APIUtils {
final InfiniteCharSequence infiniteSeq = getInfiniteSeq();
infiniteSeq.setString(string);
encoder.encode(infiniteSeq.buffer, buffer, true);
infiniteSeq.clear();
}
/**

View File

@ -410,7 +410,11 @@ final class LinuxDisplay implements DisplayImplementation {
ByteBuffer handle = peer_info.lockAndGetHandle();
try {
current_window_mode = getWindowMode(Display.isFullscreen());
boolean undecorated = Display.getPrivilegedBoolean("org.lwjgl.opengl.Window.undecorated") || current_window_mode != WINDOWED;
// Setting _MOTIF_WM_HINTS in fullscreen mode is problematic for certain window
// managers. We do not set MWM_HINTS_DECORATIONS in fullscreen mode anymore,
// unless org.lwjgl.opengl.Window.undecorated_fs has been specified.
// See native/linux/org_lwjgl_opengl_Display.c, createWindow function.
boolean undecorated = Display.getPrivilegedBoolean("org.lwjgl.opengl.Window.undecorated") || (current_window_mode != WINDOWED && Display.getPrivilegedBoolean("org.lwjgl.opengl.Window.undecorated_fs"));
this.parent = parent;
parent_window = parent != null ? getHandle(parent) : getRootWindow(getDisplay(), getDefaultScreen());
current_window = nCreateWindow(getDisplay(), getDefaultScreen(), handle, mode, current_window_mode, x, y, undecorated, parent_window);

View File

@ -222,6 +222,8 @@ public class FullScreenWindowedTest {
if (angleRotation > MAX_SPEED) {
angleRotation = MAX_SPEED;
}
while ( Mouse.next() );
}
/**
* Cleans up the test