Bug 942689 - Include modifer info in tap gesture events [r=roc,jimm,botond]

This commit is contained in:
Matt Brubeck
2013-11-25 20:30:26 -08:00
parent a3dd8eb5c1
commit 90a1b4d7ec
16 changed files with 163 additions and 75 deletions

View File

@@ -8,6 +8,7 @@
#include "AndroidBridgeUtilities.h"
#include "nsIDOMKeyEvent.h"
#include "nsIWidget.h"
#include "mozilla/BasicEvents.h"
#include "mozilla/TouchEvents.h"
using namespace mozilla;
@@ -706,7 +707,19 @@ AndroidGeckoEvent::MakeMultiTouchInput(nsIWidget* widget)
}
}
MultiTouchInput event(type, Time());
MultiTouchInput event(type, Time(), 0);
if (IsCtrlPressed()) {
event.modifiers |= MODIFIER_CONTROL;
}
if (IsAltPressed()) {
event.modifiers |= MODIFIER_ALT;
}
if (IsShiftPressed()) {
event.modifiers |= MODIFIER_SHIFT;
}
if (IsMetaPressed()) {
event.modifiers |= MODIFIER_META;
}
if (type < 0) {
// An event we don't know about