| Index: ui/display/chromeos/touchscreen_delegate_impl.cc
|
| diff --git a/ui/display/chromeos/touchscreen_delegate_impl.cc b/ui/display/chromeos/touchscreen_delegate_impl.cc
|
| index 5311a828369183a2c9cf8dfebafffb89cd67ac7f..dc60e3fb24604d7f3b1d5c7ba3774ff42f16454b 100644
|
| --- a/ui/display/chromeos/touchscreen_delegate_impl.cc
|
| +++ b/ui/display/chromeos/touchscreen_delegate_impl.cc
|
| @@ -23,7 +23,38 @@ void TouchscreenDelegateImpl::AssociateTouchscreens(
|
| std::vector<DisplayConfigurator::DisplayState>* displays) {
|
| std::set<int> no_match_touchscreen;
|
| std::vector<TouchscreenDevice> devices = touch_device_manager_->GetDevices();
|
| +
|
| + int internal_touchscreen = -1;
|
| + for (size_t i = 0; i < devices.size(); ++i) {
|
| + if (devices[i].is_internal) {
|
| + internal_touchscreen = i;
|
| + break;
|
| + }
|
| + }
|
| +
|
| + DisplayConfigurator::DisplayState* internal_state = NULL;
|
| + for (size_t i = 0; i < displays->size(); ++i) {
|
| + DisplayConfigurator::DisplayState* state = &(*displays)[i];
|
| + if (state->display->type() == DISPLAY_CONNECTION_TYPE_INTERNAL &&
|
| + state->display->native_mode() &&
|
| + state->touch_device_id == 0) {
|
| + internal_state = state;
|
| + break;
|
| + }
|
| + }
|
| +
|
| + if (internal_state && internal_touchscreen >= 0) {
|
| + internal_state->touch_device_id = devices[internal_touchscreen].id;
|
| + VLOG(2) << "Found internal touchscreen for internal display "
|
| + << internal_state->display->display_id() << " touch_device_id "
|
| + << internal_state->touch_device_id << " size "
|
| + << devices[internal_touchscreen].size.ToString();
|
| + }
|
| +
|
| for (size_t i = 0; i < devices.size(); ++i) {
|
| + if (internal_state &&
|
| + internal_state->touch_device_id == devices[i].id)
|
| + continue;
|
| bool found_mapping = false;
|
| for (size_t j = 0; j < displays->size(); ++j) {
|
| DisplayConfigurator::DisplayState* state = &(*displays)[j];
|
|
|