Bug 428988 - Expose mouse event pressure. r=Olli.Pettay, sr=roc.

This commit is contained in:
Oleg Romashin
2008-12-11 18:55:15 -05:00
parent 021698db9e
commit fbc7bd137f
12 changed files with 194 additions and 4 deletions

View File

@@ -3415,9 +3415,12 @@ nsGenericElement::DispatchClickEvent(nsPresContext* aPresContext,
aSourceEvent->widget, nsMouseEvent::eReal);
event.refPoint = aSourceEvent->refPoint;
PRUint32 clickCount = 1;
float pressure = 0;
if (aSourceEvent->eventStructType == NS_MOUSE_EVENT) {
clickCount = static_cast<nsMouseEvent*>(aSourceEvent)->clickCount;
pressure = static_cast<nsMouseEvent*>(aSourceEvent)->pressure;
}
event.pressure = pressure;
event.clickCount = clickCount;
event.isShift = aSourceEvent->isShift;
event.isControl = aSourceEvent->isControl;