|
From: <sp...@us...> - 2010-07-04 17:14:40
|
Revision: 3364
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3364&view=rev
Author: spasi
Date: 2010-07-04 17:14:33 +0000 (Sun, 04 Jul 2010)
Log Message:
-----------
Fix for Linux fullscreen mode problem with Compiz (http://lwjgl.org/forum/index.php/topic,3335.0.html)
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/APIUtils.java
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
trunk/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/APIUtils.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/APIUtils.java 2010-07-04 14:45:33 UTC (rev 3363)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/APIUtils.java 2010-07-04 17:14:33 UTC (rev 3364)
@@ -158,6 +158,7 @@
final InfiniteCharSequence infiniteSeq = getInfiniteSeq();
infiniteSeq.setString(string);
encoder.encode(infiniteSeq.buffer, buffer, true);
+ infiniteSeq.clear();
}
/**
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2010-07-04 14:45:33 UTC (rev 3363)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2010-07-04 17:14:33 UTC (rev 3364)
@@ -410,7 +410,11 @@
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);
Modified: trunk/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java 2010-07-04 14:45:33 UTC (rev 3363)
+++ trunk/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java 2010-07-04 17:14:33 UTC (rev 3364)
@@ -222,6 +222,8 @@
if (angleRotation > MAX_SPEED) {
angleRotation = MAX_SPEED;
}
+
+ while ( Mouse.next() );
}
/**
* Cleans up the test
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|