OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/base/touch/touch_factory.h" | 5 #include "ui/base/touch/touch_factory.h" |
6 | 6 |
7 #include <X11/cursorfont.h> | 7 #include <X11/cursorfont.h> |
8 #include <X11/extensions/XInput.h> | 8 #include <X11/extensions/XInput.h> |
9 #include <X11/extensions/XInput2.h> | 9 #include <X11/extensions/XInput2.h> |
10 #include <X11/extensions/XIproto.h> | 10 #include <X11/extensions/XIproto.h> |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 valuator_lookup_[info->deviceid][j] = valuator->number; | 430 valuator_lookup_[info->deviceid][j] = valuator->number; |
431 touch_param_min_[info->deviceid][j] = valuator->min; | 431 touch_param_min_[info->deviceid][j] = valuator->min; |
432 touch_param_max_[info->deviceid][j] = valuator->max; | 432 touch_param_max_[info->deviceid][j] = valuator->max; |
433 } | 433 } |
434 } | 434 } |
435 | 435 |
436 #if !defined(USE_XI2_MT) | 436 #if !defined(USE_XI2_MT) |
437 // In order to support multi-touch with XI2.0, we need both a slot_id and | 437 // In order to support multi-touch with XI2.0, we need both a slot_id and |
438 // tracking_id valuator. Without these we'll treat the device as a | 438 // tracking_id valuator. Without these we'll treat the device as a |
439 // single-touch device (like a mouse). | 439 // single-touch device (like a mouse). |
440 if (valuator_lookup_[info->deviceid][TP_SLOT_ID] == -1 || | 440 // TODO(rbyers): Multi-touch is disabled: http://crbug.com/112329 |
441 valuator_lookup_[info->deviceid][TP_TRACKING_ID] == -1) { | 441 //if (valuator_lookup_[info->deviceid][TP_SLOT_ID] == -1 || |
| 442 // valuator_lookup_[info->deviceid][TP_TRACKING_ID] == -1) { |
442 DVLOG(1) << "Touch device " << info->deviceid << | 443 DVLOG(1) << "Touch device " << info->deviceid << |
443 " does not provide enough information for multi-touch, treating as " | 444 " does not provide enough information for multi-touch, treating as " |
444 "a single-touch device."; | 445 "a single-touch device."; |
445 touch_device_list_[info->deviceid] = false; | 446 touch_device_list_[info->deviceid] = false; |
446 } | 447 //} |
447 #endif | 448 #endif |
448 } | 449 } |
449 | 450 |
450 if (info_list) | 451 if (info_list) |
451 XIFreeDeviceInfo(info_list); | 452 XIFreeDeviceInfo(info_list); |
452 } | 453 } |
453 | 454 |
454 bool TouchFactory::ExtractTouchParam(const XEvent& xev, | 455 bool TouchFactory::ExtractTouchParam(const XEvent& xev, |
455 TouchParam tp, | 456 TouchParam tp, |
456 float* value) { | 457 float* value) { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 float* max) { | 494 float* max) { |
494 if (valuator_lookup_[deviceid][tp] >= 0) { | 495 if (valuator_lookup_[deviceid][tp] >= 0) { |
495 *min = touch_param_min_[deviceid][tp]; | 496 *min = touch_param_min_[deviceid][tp]; |
496 *max = touch_param_max_[deviceid][tp]; | 497 *max = touch_param_max_[deviceid][tp]; |
497 return true; | 498 return true; |
498 } | 499 } |
499 return false; | 500 return false; |
500 } | 501 } |
501 | 502 |
502 } // namespace ui | 503 } // namespace ui |
OLD | NEW |