summaryrefslogtreecommitdiffstats
path: root/views/touchui
diff options
context:
space:
mode:
authorsaintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-21 20:28:01 +0000
committersaintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-21 20:28:01 +0000
commitf6390864a76eac26b9f3122ad48b9d5238806539 (patch)
tree6ba5f9161cca5ed888dad23d16d809f46b9c3f3a /views/touchui
parent04a2e4e64e5edf32dabf62d12c9589ba53552254 (diff)
downloadchromium_src-f6390864a76eac26b9f3122ad48b9d5238806539.zip
chromium_src-f6390864a76eac26b9f3122ad48b9d5238806539.tar.gz
chromium_src-f6390864a76eac26b9f3122ad48b9d5238806539.tar.bz2
Select on slave pointers instead of master pointers.
BUG=80193 TEST=none Review URL: http://codereview.chromium.org/6891005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82544 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/touchui')
-rw-r--r--views/touchui/touch_factory.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/views/touchui/touch_factory.cc b/views/touchui/touch_factory.cc
index dc6fb96..f9b859c 100644
--- a/views/touchui/touch_factory.cc
+++ b/views/touchui/touch_factory.cc
@@ -185,10 +185,12 @@ void TouchFactory::UpdateDeviceList(Display* display) {
// Instead of asking X for the list of devices all the time, let's maintain a
// list of pointer devices we care about.
- // It is not necessary to select for slave devices. XInput2 provides enough
- // information to the event callback to decide which slave device triggered
- // the event, thus decide whether the 'pointer event' is a 'mouse event' or a
- // 'touch event'.
+ // It should not be necessary to select for slave devices. XInput2 provides
+ // enough information to the event callback to decide which slave device
+ // triggered the event, thus decide whether the 'pointer event' is a
+ // 'mouse event' or a 'touch event'.
+ // However, on some desktops, some events from a master pointer are
+ // not delivered to the client. So we select for slave devices instead.
// If the touch device has 'GrabDevice' set and 'SendCoreEvents' unset (which
// is possible), then the device is detected as a floating device, and a
// floating device is not connected to a master device. So it is necessary to
@@ -197,7 +199,7 @@ void TouchFactory::UpdateDeviceList(Display* display) {
XIDeviceInfo* devices = XIQueryDevice(display, XIAllDevices, &count);
for (int i = 0; i < count; i++) {
XIDeviceInfo* devinfo = devices + i;
- if (devinfo->use == XIFloatingSlave || devinfo->use == XIMasterPointer) {
+ if (devinfo->use == XIFloatingSlave || devinfo->use == XISlavePointer) {
pointer_device_lookup_[devinfo->deviceid] = true;
}
}