map horizontal scroll wheel events to vertical scroll wheel events,

should fix the no event issue when using shift + scroll wheel
This commit is contained in:
kappaOne 2013-04-14 15:19:49 +01:00
parent 5378a48083
commit 1f81b30f66
1 changed files with 4 additions and 1 deletions

View File

@ -215,7 +215,10 @@ final class MacOSXNativeMouse extends EventQueue {
setCursorPos(x, y, nanos);
}
if ( dz != 0 ) {
int wheel_amount = (int)(dy * WHEEL_SCALE);
// if no vertical wheel events, then map the horizontal wheel event to it
if (dy == 0) dy = dx;
int wheel_amount = (int)(dy * WHEEL_SCALE);
accum_dz += wheel_amount;
putMouseEvent((byte)-1, (byte)0, wheel_amount, nanos);
}