Fixing a bug on Windows where CTRL, SHIFT, and ALT states were not being

set properly on mouse events.
This commit is contained in:
hyatt%netscape.com 1999-02-03 22:36:34 +00:00
Родитель 7c19c2563a
Коммит 9ad728bea1
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -1842,9 +1842,9 @@ PRBool nsWindow::DispatchMouseEvent(PRUint32 aEventType, nsPoint* aPoint)
nsMouseEvent event; nsMouseEvent event;
InitEvent(event, aEventType, aPoint); InitEvent(event, aEventType, aPoint);
event.isShift = GetKeyState(VK_LSHIFT) < 0 || GetKeyState(VK_RSHIFT) < 0; event.isShift = IS_VK_DOWN(NS_VK_SHIFT);
event.isControl = GetKeyState(VK_LCONTROL) < 0 || GetKeyState(VK_RCONTROL) < 0; event.isControl = IS_VK_DOWN(NS_VK_CONTROL);
event.isAlt = GetKeyState(VK_LMENU) < 0 || GetKeyState(VK_RMENU) < 0; event.isAlt = IS_VK_DOWN(NS_VK_ALT);
event.clickCount = (aEventType == NS_MOUSE_LEFT_DOUBLECLICK || event.clickCount = (aEventType == NS_MOUSE_LEFT_DOUBLECLICK ||
aEventType == NS_MOUSE_LEFT_DOUBLECLICK)? 2:1; aEventType == NS_MOUSE_LEFT_DOUBLECLICK)? 2:1;
event.eventStructType = NS_MOUSE_EVENT; event.eventStructType = NS_MOUSE_EVENT;