Commit 7f2fdcb1 authored by Sadrul Habib Chowdhury's avatar Sadrul Habib Chowdhury Committed by Commit Bot

x11: vendor/product ids of devices are no longer used.

The usb-style vendor-id/product-id for input devices are no longer
used. So remove them.

Bug: None
Change-Id: I72b8c136799f944281849b461140beb636ef75c9
Reviewed-on: https://chromium-review.googlesource.com/967732Reviewed-by: default avatarkylechar <kylechar@chromium.org>
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544121}
parent 6599fd42
......@@ -108,13 +108,9 @@ struct TouchClassInfo {
struct DeviceInfo {
DeviceInfo(const XIDeviceInfo& device,
DeviceType type,
const base::FilePath& path,
uint16_t vendor,
uint16_t product)
const base::FilePath& path)
: id(device.deviceid),
name(device.name),
vendor_id(vendor),
product_id(product),
use(device.use),
type(type),
path(path) {
......@@ -143,10 +139,6 @@ struct DeviceInfo {
// Internal device name.
std::string name;
// USB-style device identifiers.
uint16_t vendor_id;
uint16_t product_id;
// Device type (ie: XIMasterPointer)
int use;
......@@ -433,31 +425,8 @@ void X11HotplugEventHandler::OnHotplugEvent() {
(device.deviceid >= 0 && device.deviceid < kMaxDeviceNum)
? device_types[device.deviceid]
: DEVICE_TYPE_OTHER;
// Obtain the USB-style vendor and product identifiers.
// (On Linux, XI2 makes this available for all evdev devices.
uint32_t* product_info;
Atom type;
int format_return;
unsigned long num_items_return;
unsigned long bytes_after_return;
uint16_t vendor = 0;
uint16_t product = 0;
if (XIGetProperty(gfx::GetXDisplay(), device.deviceid,
gfx::GetAtom(XI_PROP_PRODUCT_ID), 0, 2, 0, XA_INTEGER,
&type, &format_return, &num_items_return,
&bytes_after_return,
reinterpret_cast<unsigned char**>(&product_info)) == 0 &&
product_info) {
if (num_items_return == 2) {
vendor = product_info[0];
product = product_info[1];
}
XFree(product_info);
}
device_infos.push_back(DeviceInfo(
device, device_type, GetDevicePath(display, device), vendor, product));
device_infos.push_back(
DeviceInfo(device, device_type, GetDevicePath(display, device)));
}
// X11 is not thread safe, so first get all the required state.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment