From 0cc0a2bcbf5a5d4b850e2e0fffb904eae95bac36 Mon Sep 17 00:00:00 2001 From: kappa1 Date: Tue, 27 Sep 2011 22:38:32 +0000 Subject: [PATCH] LinuxDisplay use proper constant name (X_SetInputFocus) for xembedded fix --- src/java/org/lwjgl/opengl/LinuxDisplay.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/java/org/lwjgl/opengl/LinuxDisplay.java b/src/java/org/lwjgl/opengl/LinuxDisplay.java index 56943463..85510132 100644 --- a/src/java/org/lwjgl/opengl/LinuxDisplay.java +++ b/src/java/org/lwjgl/opengl/LinuxDisplay.java @@ -85,6 +85,8 @@ final class LinuxDisplay implements DisplayImplementation { private static final int SetModeInsert = 0; private static final int SaveSetRoot = 1; private static final int SaveSetUnmap = 1; + + private static final int X_SetInputFocus = 42; /** Window mode enum */ private static final int FULLSCREEN_LEGACY = 1; @@ -299,7 +301,7 @@ final class LinuxDisplay implements DisplayImplementation { 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 (xembedded && request_code == 42) return 0; // ignore X error in xembeded mode to fix a browser issue when dragging or switching tabs + if (xembedded && request_code == X_SetInputFocus) return 0; // ignore X error in xembeded mode to fix a browser issue when dragging or switching tabs if (display == getDisplay()) { String error_msg = getErrorText(display, error_code);