Linux: Fix more mouse handling bugs

This commit is contained in:
Elias Naur 2004-12-11 11:11:23 +00:00
parent 69fc946640
commit f8dc7fa67b
1 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ static bool putMouseEventWithCoords(jint button, jint state, jint coord1, jint c
}
static bool putMouseEvent(jint button, jint state, jint dz) {
if (pointer_grabbed)
if (shouldGrab())
return putMouseEventWithCoords(button, state, 0, 0, dz);
else
return putMouseEventWithCoords(button, state, last_x, last_y, dz);
@ -370,7 +370,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_pollMouse(JNIEnv * env
printfDebug("ERROR: Not enough space in coords array: %d < 3\n", coords_length);
return;
}
if (pointer_grabbed) {
if (shouldGrab()) {
coords[0] = accum_dx;
coords[1] = accum_dy;
} else {