From bbe74afddbb0fd19947b849b180b2f36be605f8b Mon Sep 17 00:00:00 2001 From: kappa1 Date: Tue, 24 Nov 2009 20:13:12 +0000 Subject: [PATCH] Mouse Grab Bug on Linux Fixed when LWJGL is run as an applet. --- src/java/org/lwjgl/opengl/LinuxDisplay.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/java/org/lwjgl/opengl/LinuxDisplay.java b/src/java/org/lwjgl/opengl/LinuxDisplay.java index 6242487a..a00a1397 100644 --- a/src/java/org/lwjgl/opengl/LinuxDisplay.java +++ b/src/java/org/lwjgl/opengl/LinuxDisplay.java @@ -871,13 +871,15 @@ final class LinuxDisplay implements DisplayImplementation { return; focused = got_focus; + if (focused) { + acquireInput(); + } + if (parent != null && xembedded && focused != parent.hasFocus()) { return; } - if (focused) { - acquireInput(); - } else { + if (!focused) { releaseInput(); if (parent != null && xembedded) {