fix OS X issue where mouse was moving on mouse scroll wheel events.
This commit is contained in:
parent
11a6a30391
commit
cc14c026ef
|
@ -207,15 +207,8 @@ final class MacOSXNativeMouse extends EventQueue {
|
|||
}
|
||||
return;
|
||||
}
|
||||
if (grabbed) {
|
||||
if ( dx != 0 || dy != 0 ) {
|
||||
putMouseEventWithCoords((byte)-1, (byte)0, (int)dx, (int)-dy, 0, nanos);
|
||||
addDelta(dx, dy);
|
||||
}
|
||||
} else {
|
||||
setCursorPos(x, y, nanos);
|
||||
}
|
||||
if ( dz != 0 ) {
|
||||
|
||||
if ( dz != 0 ) { // if scroll wheel event
|
||||
// if no vertical wheel events, then map the horizontal wheel event to it
|
||||
if (dy == 0) dy = dx;
|
||||
|
||||
|
@ -223,5 +216,13 @@ final class MacOSXNativeMouse extends EventQueue {
|
|||
accum_dz += wheel_amount;
|
||||
putMouseEvent((byte)-1, (byte)0, wheel_amount, nanos);
|
||||
}
|
||||
else if (grabbed) {
|
||||
if ( dx != 0 || dy != 0 ) {
|
||||
putMouseEventWithCoords((byte)-1, (byte)0, (int)dx, (int)-dy, 0, nanos);
|
||||
addDelta(dx, dy);
|
||||
}
|
||||
} else {
|
||||
setCursorPos(x, y, nanos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue