Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: ui/events/devices/x11/touch_factory_x11.cc

Issue 2552343008: Add slave touch device to touch_device_lookup_ and touch_device_list_ (Closed)
Patch Set: add slave touch screen to list and lookup Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/devices/x11/touch_factory_x11.cc
diff --git a/ui/events/devices/x11/touch_factory_x11.cc b/ui/events/devices/x11/touch_factory_x11.cc
index 3b91724f4f6a6e8ab31489fe58d92aec9648d434..0a1a2f8642487e5cfee0511ffa2254ab55d6c82f 100644
--- a/ui/events/devices/x11/touch_factory_x11.cc
+++ b/ui/events/devices/x11/touch_factory_x11.cc
@@ -125,6 +125,8 @@ void TouchFactory::UpdateDeviceList(XDisplay* display) {
// Only care direct touch device (such as touch screen) right now
if (tci->mode == XIDirectTouch) {
CacheTouchscreenIds(devinfo.deviceid);
+ touch_device_lookup_[devinfo.deviceid] = true;
+ touch_device_list_[devinfo.deviceid] = false;
sadrul 2016/12/12 16:02:06 I think this is getting fairly confusing. Can you
if (devinfo.use == XISlavePointer) {
device_master_id_list_[devinfo.deviceid] = devinfo.attachment;
// If the slave device is direct touch device, we also set its
@@ -149,6 +151,9 @@ bool TouchFactory::ShouldProcessXI2Event(XEvent* xev) {
if (event->evtype == XI_TouchBegin ||
event->evtype == XI_TouchUpdate ||
event->evtype == XI_TouchEnd) {
+ // TODO(chaopeng) we need to add deviceid to touch_device_lookup_ if this
+ // assertion failed.
+ DCHECK(touch_device_lookup_[xiev->deviceid]);
// Since SetupXI2ForXWindow() selects events from all devices, for a
// touchscreen attached to a master pointer device, X11 sends two
// events for each touch: one from the slave (deviceid == the id of
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698