You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(2) |
2
(2) |
3
(2) |
4
|
5
(2) |
|
6
(5) |
7
(22) |
8
(4) |
9
(5) |
10
(6) |
11
(5) |
12
(7) |
|
13
(11) |
14
(1) |
15
(1) |
16
|
17
|
18
(3) |
19
(1) |
|
20
(10) |
21
(3) |
22
(7) |
23
|
24
(2) |
25
(2) |
26
(2) |
|
27
(1) |
28
(1) |
29
(4) |
30
(9) |
|
|
|
|
From: <eli...@us...> - 2008-04-13 19:12:53
|
Revision: 3022
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3022&view=rev
Author: elias_naur
Date: 2008-04-13 12:12:51 -0700 (Sun, 13 Apr 2008)
Log Message:
-----------
Linux: Another applet focus tweak
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 18:46:25 UTC (rev 3021)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 19:12:51 UTC (rev 3022)
@@ -860,8 +860,10 @@
return;
if (focused) {
if (xembedded && !parent_focused && parent_focus_window_valid) {
- setInputFocusUnsafe(parent_focus_window);
- parent_focus_changed = false;
+ if (nGetInputFocus(getDisplay()) == current_window) {
+ setInputFocusUnsafe(parent_focus_window);
+ parent_focus_changed = false;
+ }
}
} else {
if (parent_focused) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-13 18:46:29
|
Revision: 3021
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3021&view=rev
Author: elias_naur
Date: 2008-04-13 11:46:25 -0700 (Sun, 13 Apr 2008)
Log Message:
-----------
Linux: Another focus fix
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 18:43:27 UTC (rev 3020)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 18:46:25 UTC (rev 3021)
@@ -427,7 +427,7 @@
current_window_mode = getWindowMode(fullscreen);
boolean undecorated = Display.getPrivilegedBoolean("org.lwjgl.opengl.Window.undecorated") || current_window_mode != WINDOWED;
this.parent = parent;
- long parent_window = parent != null ? getHandle(parent) : getRootWindow(getDisplay(), getDefaultScreen());
+ parent_window = parent != null ? getHandle(parent) : getRootWindow(getDisplay(), getDefaultScreen());
current_window = nCreateWindow(getDisplay(), getDefaultScreen(), handle, mode, current_window_mode, x, y, undecorated, parent_window);
mapRaised(getDisplay(), current_window);
xembedded = parent != null && isAncestorXEmbedded(parent_window);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-13 18:43:30
|
Revision: 3020
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3020&view=rev
Author: elias_naur
Date: 2008-04-13 11:43:27 -0700 (Sun, 13 Apr 2008)
Log Message:
-----------
Applet focus fixes
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 18:26:22 UTC (rev 3019)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 18:43:27 UTC (rev 3020)
@@ -468,7 +468,7 @@
private boolean isAncestorXEmbedded(long window) throws LWJGLException {
long xembed_atom = internAtom("_XEMBED_INFO", true);
if (xembed_atom != None) {
- long w = parent_window;
+ long w = window;
while (w != None) {
if (hasProperty(getDisplay(), w, xembed_atom))
return true;
Modified: trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c 2008-04-13 18:26:22 UTC (rev 3019)
+++ trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c 2008-04-13 18:43:27 UTC (rev 3020)
@@ -85,8 +85,11 @@
JNIEnv *env = getThreadEnv();
if (env != NULL) {
jclass org_lwjgl_LinuxDisplay_class = (*env)->FindClass(env, "org/lwjgl/opengl/LinuxDisplay");
- if (org_lwjgl_LinuxDisplay_class == NULL)
+ if (org_lwjgl_LinuxDisplay_class == NULL) {
+ // Don't propagate error
+ (*env)->ExceptionClear(env);
return 0;
+ }
jmethodID handler_method = (*env)->GetStaticMethodID(env, org_lwjgl_LinuxDisplay_class, "globalErrorHandler", "(JJJJJJJ)I");
if (handler_method == NULL)
return 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-13 18:26:26
|
Revision: 3019
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3019&view=rev
Author: elias_naur
Date: 2008-04-13 11:26:22 -0700 (Sun, 13 Apr 2008)
Log Message:
-----------
Don't set icon when Display is parented
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2008-04-13 18:13:26 UTC (rev 3018)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2008-04-13 18:26:22 UTC (rev 3019)
@@ -1092,7 +1092,7 @@
}
}
- if(Display.isCreated()) {
+ if (Display.isCreated() && parent == null) {
return display_impl.setIcon(cached_icons);
} else {
return 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-13 18:13:31
|
Revision: 3018
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3018&view=rev
Author: elias_naur
Date: 2008-04-13 11:13:26 -0700 (Sun, 13 Apr 2008)
Log Message:
-----------
LinuxDisplay.java: Fixed missing return
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 18:11:38 UTC (rev 3017)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 18:13:26 UTC (rev 3018)
@@ -285,7 +285,7 @@
String error_msg = getErrorText(display, error_code);
throw new LWJGLException("X Error - disp: 0x" + Long.toHexString(error_display) + " serial: " + serial + " error: " + error_msg + " request_code: " + request_code + " minor_code: " + minor_code);
} else if (saved_error_handler != 0)
- callErrorHandler(saved_error_handler, display, event_ptr);
+ return callErrorHandler(saved_error_handler, display, event_ptr);
return 0;
}
private static native String getErrorText(long display, long error_code);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-13 18:11:40
|
Revision: 3017
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3017&view=rev
Author: elias_naur
Date: 2008-04-13 11:11:38 -0700 (Sun, 13 Apr 2008)
Log Message:
-----------
Linux: Some DRI drivers don't like to have the context destroyed before the window, even though the context is not current anymore. The destroy ordering in Display.destroy is now flipped as a workaround
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2008-04-13 17:04:05 UTC (rev 3016)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2008-04-13 18:11:38 UTC (rev 3017)
@@ -310,13 +310,7 @@
}
}
- private static void destroyWindow() {
- if (!window_created) {
- return;
- }
- if (parent != null) {
- parent.removeComponentListener(component_listener);
- }
+ private static void releaseDrawable() {
try {
if (context != null && context.isCurrent()) {
Context.releaseCurrentContext();
@@ -325,7 +319,17 @@
} catch (LWJGLException e) {
LWJGLUtil.log("Exception occurred while trying to release context: " + e);
}
+ }
+ private static void destroyWindow() {
+ if (!window_created) {
+ return;
+ }
+ if (parent != null) {
+ parent.removeComponentListener(component_listener);
+ }
+ releaseDrawable();
+
// Automatically destroy keyboard & mouse
if (Mouse.isCreated()) {
Mouse.destroy();
@@ -932,8 +936,9 @@
return;
}
+ releaseDrawable();
+ destroyContext();
destroyWindow();
- destroyContext();
destroyPeerInfo();
x = y = -1;
cached_icons = null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-13 17:04:08
|
Revision: 3016
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3016&view=rev
Author: elias_naur
Date: 2008-04-13 10:04:05 -0700 (Sun, 13 Apr 2008)
Log Message:
-----------
Made FullScreenWindowedTest call Display.destroy() on exit
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java
Modified: trunk/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java 2008-04-13 16:32:55 UTC (rev 3015)
+++ trunk/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java 2008-04-13 17:04:05 UTC (rev 3016)
@@ -219,7 +219,7 @@
* Cleans up the test
*/
private void cleanup() {
-// Display.destroy();
+ Display.destroy();
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2008-04-13 16:32:59
|
Revision: 3015
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3015&view=rev
Author: matzon
Date: 2008-04-13 09:32:55 -0700 (Sun, 13 Apr 2008)
Log Message:
-----------
dont add the platform native jar to the classpath
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2008-04-13 11:28:41 UTC (rev 3014)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2008-04-13 16:32:55 UTC (rev 3015)
@@ -616,7 +616,7 @@
Class[] parameters = new Class[] {URL.class};
// modify class path by adding downloaded jars to it
- for (int i = 0; i < urlList.length; i++) {
+ for (int i = 0; i < urlList.length-1; i++) {
// get location of jar as a url
URL u = new URL("file:" + path + getFileName(urlList[i]));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-13 11:28:44
|
Revision: 3014
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3014&view=rev
Author: elias_naur
Date: 2008-04-13 04:28:41 -0700 (Sun, 13 Apr 2008)
Log Message:
-----------
Linux: Don't let display usage count reach 0
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 08:34:39 UTC (rev 3013)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 11:28:41 UTC (rev 3014)
@@ -291,15 +291,15 @@
private static native String getErrorText(long display, long error_code);
static void decDisplay() {
- display_connection_usage_count--;
- if (display_connection_usage_count < 0)
- throw new InternalError("display_connection_usage_count < 0: " + display_connection_usage_count);
/*
* Some drivers (at least some versions of the radeon dri driver)
* don't like it when the display is closed and later re-opened,
* so we'll just let the singleton display connection leak.
*/
-/* if (display_connection_usage_count == 0) {
+/* display_connection_usage_count--;
+ if (display_connection_usage_count < 0)
+ throw new InternalError("display_connection_usage_count < 0: " + display_connection_usage_count);
+ if (display_connection_usage_count == 0) {
closeDisplay(display);
resetErrorHandler(saved_error_handler);
display = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Dilun <ntl...@Co...> - 2008-04-13 09:05:58
|
With this, all the babes will flock to you. http://www.reventuae.com/ |
|
From: <eli...@us...> - 2008-04-13 08:34:42
|
Revision: 3013
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3013&view=rev
Author: elias_naur
Date: 2008-04-13 01:34:39 -0700 (Sun, 13 Apr 2008)
Log Message:
-----------
Linux: Moved X error handling to java
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
trunk/LWJGL/src/native/linux/lwjgl.map
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-12 23:09:47 UTC (rev 3012)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 08:34:39 UTC (rev 3013)
@@ -90,6 +90,7 @@
/** Current X11 Display pointer */
private static long display;
private static long current_window;
+ private static long saved_error_handler;
private static int display_connection_usage_count = 0;
@@ -268,22 +269,39 @@
static void incDisplay() throws LWJGLException {
if (display_connection_usage_count == 0) {
GLContext.loadOpenGLLibrary();
+ saved_error_handler = setErrorHandler();
display = openDisplay();
+// synchronize(display, true);
}
display_connection_usage_count++;
}
-
+ private static native int callErrorHandler(long handler, long display, long error_ptr);
+ private static native long setErrorHandler();
+ private static native long resetErrorHandler(long handler);
+ private static native void synchronize(long display, boolean synchronize);
+
+ private static int globalErrorHandler(long display, long event_ptr, long error_display, long serial, long error_code, long request_code, long minor_code) throws LWJGLException {
+ if (display == getDisplay()) {
+ String error_msg = getErrorText(display, error_code);
+ throw new LWJGLException("X Error - disp: 0x" + Long.toHexString(error_display) + " serial: " + serial + " error: " + error_msg + " request_code: " + request_code + " minor_code: " + minor_code);
+ } else if (saved_error_handler != 0)
+ callErrorHandler(saved_error_handler, display, event_ptr);
+ return 0;
+ }
+ private static native String getErrorText(long display, long error_code);
+
static void decDisplay() {
+ display_connection_usage_count--;
+ if (display_connection_usage_count < 0)
+ throw new InternalError("display_connection_usage_count < 0: " + display_connection_usage_count);
/*
* Some drivers (at least some versions of the radeon dri driver)
* don't like it when the display is closed and later re-opened,
* so we'll just let the singleton display connection leak.
*/
-/* display_connection_usage_count--;
- if (display_connection_usage_count < 0)
- throw new InternalError("display_connection_usage_count < 0: " + display_connection_usage_count);
- if (display_connection_usage_count == 0) {
+/* if (display_connection_usage_count == 0) {
closeDisplay(display);
+ resetErrorHandler(saved_error_handler);
display = 0;
GLContext.unloadOpenGLLibrary();
}*/
@@ -870,15 +888,15 @@
static native long nGetInputFocus(long display);
private void setInputFocusUnsafe(long window) {
- setInputFocus(getDisplay(), window, CurrentTime);
try {
- checkXError(getDisplay());
+ setInputFocus(getDisplay(), window, CurrentTime);
+ sync(getDisplay(), false);
} catch (LWJGLException e) {
// Since we don't have any event timings for XSetInputFocus, a race condition might give a BadMatch, which we'll catch and ignore
LWJGLUtil.log("Got exception while trying to focus: " + e);
}
}
- private static native void checkXError(long display) throws LWJGLException;
+ private static native void sync(long display, boolean throw_away_events) throws LWJGLException;
private void releaseInput() {
if (isLegacyFullscreen() || input_released)
Modified: trunk/LWJGL/src/native/linux/lwjgl.map
===================================================================
--- trunk/LWJGL/src/native/linux/lwjgl.map 2008-04-12 23:09:47 UTC (rev 3012)
+++ trunk/LWJGL/src/native/linux/lwjgl.map 2008-04-13 08:34:39 UTC (rev 3013)
@@ -1,4 +1,7 @@
{
- global: Java_*;
+ global:
+ Java_*;
+ JNI_OnLoad;
+ JNI_OnUnload;
local: *;
};
Modified: trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c 2008-04-12 23:09:47 UTC (rev 3012)
+++ trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c 2008-04-13 08:34:39 UTC (rev 3013)
@@ -76,35 +76,27 @@
static Visual *current_visual;
-static bool async_x_error;
-static char error_message[ERR_MSG_SIZE];
-
static bool checkXError(JNIEnv *env, Display *disp) {
XSync(disp, False);
- if (async_x_error) {
- async_x_error = false;
- if (env != NULL)
- throwException(env, error_message);
- else
- printfDebug(error_message);
- return false;
- } else
- return true;
+ return (*env)->ExceptionCheck(env) == JNI_FALSE;
}
-static int errorHandler(Display *disp, XErrorEvent *error) {
- char err_msg_buffer[ERR_MSG_SIZE];
- XGetErrorText(disp, error->error_code, err_msg_buffer, ERR_MSG_SIZE);
- err_msg_buffer[ERR_MSG_SIZE - 1] = '\0';
- snprintf(error_message, ERR_MSG_SIZE, "X Error - serial: %d, error_code: %s, request_code: %d, minor_code: %d", (int)error->serial, err_msg_buffer, (int)error->request_code, (int)error->minor_code);
- error_message[ERR_MSG_SIZE - 1] = '\0';
- async_x_error = true;
- return 0;
+static int global_error_handler(Display *disp, XErrorEvent *error) {
+ JNIEnv *env = getThreadEnv();
+ if (env != NULL) {
+ jclass org_lwjgl_LinuxDisplay_class = (*env)->FindClass(env, "org/lwjgl/opengl/LinuxDisplay");
+ if (org_lwjgl_LinuxDisplay_class == NULL)
+ return 0;
+ jmethodID handler_method = (*env)->GetStaticMethodID(env, org_lwjgl_LinuxDisplay_class, "globalErrorHandler", "(JJJJJJJ)I");
+ if (handler_method == NULL)
+ return 0;
+ return (*env)->CallStaticIntMethod(env, org_lwjgl_LinuxDisplay_class, handler_method, (jlong)(intptr_t)disp, (jlong)(intptr_t)error,
+ (jlong)(intptr_t)error->display, (jlong)error->serial, (jlong)error->error_code, (jlong)error->request_code, (jlong)error->minor_code);
+ } else
+ return 0;
}
static jlong openDisplay(JNIEnv *env) {
- async_x_error = false;
- XSetErrorHandler(errorHandler);
Display *display_connection = XOpenDisplay(NULL);
if (display_connection == NULL) {
throwException(env, "Could not open X display connection");
@@ -113,12 +105,35 @@
return (intptr_t)display_connection;
}
-JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_checkXError(JNIEnv *env, jclass unused, jlong display_ptr) {
+JNIEXPORT jstring JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getErrorText(JNIEnv *env, jclass unused, jlong display_ptr, jlong error_code) {
Display *disp = (Display *)(intptr_t)display_ptr;
- XSync(disp, False);
- checkXError(env, disp);
+ char err_msg_buffer[ERR_MSG_SIZE];
+ XGetErrorText(disp, error_code, err_msg_buffer, ERR_MSG_SIZE);
+ err_msg_buffer[ERR_MSG_SIZE - 1] = '\0';
+ return NewStringNativeWithLength(env, err_msg_buffer, strlen(err_msg_buffer));
}
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_callErrorHandler(JNIEnv *env, jclass unused, jlong handler_ptr, jlong display_ptr, jlong event_ptr) {
+ XErrorHandler handler = (XErrorHandler)(intptr_t)handler_ptr;
+ Display *disp = (Display *)(intptr_t)display_ptr;
+ XErrorEvent *event = (XErrorEvent *)(intptr_t)event_ptr;
+ return (jint)handler(disp, event);
+}
+
+JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_setErrorHandler(JNIEnv *env, jclass unused) {
+ return (intptr_t)XSetErrorHandler(global_error_handler);
+}
+
+JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_resetErrorHandler(JNIEnv *env, jclass unused, jlong handler_ptr) {
+ XErrorHandler handler = (XErrorHandler)(intptr_t)handler_ptr;
+ return (intptr_t)XSetErrorHandler(handler);
+}
+
+JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_sync(JNIEnv *env, jclass unused, jlong display_ptr, jboolean throw_away_events) {
+ Display *disp = (Display *)(intptr_t)display_ptr;
+ XSync(disp, throw_away_events ? True : False);
+}
+
JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetDefaultScreen(JNIEnv *env, jclass unused, jlong display_ptr) {
Display *disp = (Display *)(intptr_t)display_ptr;
return XDefaultScreen(disp);
@@ -238,6 +253,11 @@
XResizeWindow(disp, window, width, height);
}
+JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_synchronize(JNIEnv *env, jclass clazz, jlong display, jboolean synchronize) {
+ Display *disp = (Display *)(intptr_t)display;
+ XSynchronize(disp, synchronize ? True : False);
+}
+
JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getRootWindow(JNIEnv *env, jclass clazz, jlong display, jint screen) {
Display *disp = (Display *)(intptr_t)display;
return RootWindow(disp, screen);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|