Applet focus fixes

This commit is contained in:
Elias Naur 2008-04-13 18:43:27 +00:00
parent 37ab6afff2
commit be0fbdf13b
2 changed files with 5 additions and 2 deletions

View File

@ -468,7 +468,7 @@ final class LinuxDisplay implements DisplayImplementation {
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;

View File

@ -85,8 +85,11 @@ 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)
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;