Windows: Don't grab mouse when not focused
This commit is contained in:
parent
48b37620c4
commit
d0736741d9
|
@ -136,13 +136,14 @@ final class WindowsMouse {
|
||||||
if (grab) {
|
if (grab) {
|
||||||
if (!mouse_grabbed) {
|
if (!mouse_grabbed) {
|
||||||
mouse_grabbed = true;
|
mouse_grabbed = true;
|
||||||
try {
|
if (should_center) {
|
||||||
WindowsDisplay.setupCursorClipping(hwnd);
|
try {
|
||||||
} catch (LWJGLException e) {
|
WindowsDisplay.setupCursorClipping(hwnd);
|
||||||
LWJGLUtil.log("Failed to setup cursor clipping: " + e);
|
} catch (LWJGLException e) {
|
||||||
}
|
LWJGLUtil.log("Failed to setup cursor clipping: " + e);
|
||||||
if (should_center)
|
}
|
||||||
centerCursor();
|
centerCursor();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (mouse_grabbed) {
|
if (mouse_grabbed) {
|
||||||
|
|
Loading…
Reference in New Issue