Windows: Fix RawMouse event bug where all mouse clicks would end up being reported on the left (primary) mouse button

This commit is contained in:
elias 2006-07-04 21:25:51 +00:00
parent 4306f119c2
commit 4931654f9c

View file

@ -133,22 +133,22 @@ final class RawMouse extends Mouse {
break;
case EVENT_BUTTON_1:
event_state = EVENT_BUTTON_2;
if (makeButtonEvent(current_event, event, getLeft(), RawDevice.RI_MOUSE_BUTTON_2_DOWN, RawDevice.RI_MOUSE_BUTTON_2_UP))
if (makeButtonEvent(current_event, event, getRight(), RawDevice.RI_MOUSE_BUTTON_2_DOWN, RawDevice.RI_MOUSE_BUTTON_2_UP))
return true;
break;
case EVENT_BUTTON_2:
event_state = EVENT_BUTTON_3;
if (makeButtonEvent(current_event, event, getLeft(), RawDevice.RI_MOUSE_BUTTON_3_DOWN, RawDevice.RI_MOUSE_BUTTON_3_UP))
if (makeButtonEvent(current_event, event, getMiddle(), RawDevice.RI_MOUSE_BUTTON_3_DOWN, RawDevice.RI_MOUSE_BUTTON_3_UP))
return true;
break;
case EVENT_BUTTON_3:
event_state = EVENT_BUTTON_4;
if (makeButtonEvent(current_event, event, getLeft(), RawDevice.RI_MOUSE_BUTTON_4_DOWN, RawDevice.RI_MOUSE_BUTTON_4_UP))
if (makeButtonEvent(current_event, event, getSide(), RawDevice.RI_MOUSE_BUTTON_4_DOWN, RawDevice.RI_MOUSE_BUTTON_4_UP))
return true;
break;
case EVENT_BUTTON_4:
event_state = EVENT_DONE;
if (makeButtonEvent(current_event, event, getLeft(), RawDevice.RI_MOUSE_BUTTON_5_DOWN, RawDevice.RI_MOUSE_BUTTON_5_UP))
if (makeButtonEvent(current_event, event, getExtra(), RawDevice.RI_MOUSE_BUTTON_5_DOWN, RawDevice.RI_MOUSE_BUTTON_5_UP))
return true;
break;
default: