Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Restore previous input device to display pairing behavior.
Browse files Browse the repository at this point in the history
We want to always associate a input device so that we don't accidentally break
anyone who is depending on this behavior.

BUG=582516

patch from issue 1652513002 at patchset 20001 (http://crrev.com/1652513002#ps20001)

(cherry picked from commit d5c1e3b0b0a7b5b960ef16062d5722f24a1ea698)

Review URL: https://codereview.chromium.org/1659543002 .

Cr-Commit-Position: refs/branch-heads/2623@{#216}
Cr-Branched-From: 92d7753-refs/heads/master@{#369907}
  • Loading branch information
jacobdufault-google committed Feb 1, 2016
1 parent 66e24c5 commit 351c3e6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ash/touch/touchscreen_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,18 @@ void AssociateTouchscreens(
VLOG(1) << "Unassociated display " << display->name();
for (const ui::TouchscreenDevice* device : devices)
VLOG(1) << "Unassociated device " << device->name;

// Match any unassociated devices to a display. This maintains existing
// pairing behavior. See crbug.com/582516.
if (displays.size() > 0 && devices.size() > 0) {
DisplayInfo* display = displays[0];

for (const ui::TouchscreenDevice* device : devices) {
VLOG(1) << "Randomly matching device " << device->name << " to display "
<< display->name();
Associate(display, device);
}
}
}

} // namespace ash

0 comments on commit 351c3e6

Please sign in to comment.