summaryrefslogtreecommitdiffstats
path: root/ui/base/x
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-23 20:24:45 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-23 20:24:45 +0000
commitb05b40c076d8562b2332321bbb749dcf352553d6 (patch)
tree3aa3677d2fd153695f655171d13f4914d7a45931 /ui/base/x
parenta458504b28a6688e0524f91b90b487246385a593 (diff)
downloadchromium_src-b05b40c076d8562b2332321bbb749dcf352553d6.zip
chromium_src-b05b40c076d8562b2332321bbb749dcf352553d6.tar.gz
chromium_src-b05b40c076d8562b2332321bbb749dcf352553d6.tar.bz2
XI2.2: Make sure floating touch-events receive modifier flags.
BUG=138544 TEST=manually Review URL: https://chromiumcodereview.appspot.com/10790123 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147912 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/x')
-rw-r--r--ui/base/x/events_x.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/ui/base/x/events_x.cc b/ui/base/x/events_x.cc
index 4ad90e0..fe64439 100644
--- a/ui/base/x/events_x.cc
+++ b/ui/base/x/events_x.cc
@@ -720,11 +720,21 @@ int EventFlagsFromNative(const base::NativeEvent& native_event) {
XIDeviceEvent* xievent =
static_cast<XIDeviceEvent*>(native_event->xcookie.data);
- const bool touch =
- TouchFactory::GetInstance()->IsTouchDevice(xievent->sourceid);
switch (xievent->evtype) {
+#if defined(USE_XI2_MT)
+ case XI_TouchBegin:
+ case XI_TouchUpdate:
+ case XI_TouchEnd:
+ return GetButtonMaskForX2Event(xievent) |
+ GetEventFlagsFromXState(xievent->mods.effective) |
+ GetEventFlagsFromXState(
+ XModifierStateWatcher::GetInstance()->state());
+ break;
+#endif
case XI_ButtonPress:
case XI_ButtonRelease: {
+ const bool touch =
+ TouchFactory::GetInstance()->IsTouchDevice(xievent->sourceid);
int flags = GetButtonMaskForX2Event(xievent) |
GetEventFlagsFromXState(xievent->mods.effective);
if (touch) {