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

Unified Diff: ui/events/devices/x11/device_data_manager_x11.h

Issue 2848253002: Merge DeviceDataManagerX11 valuator information. (Closed)
Patch Set: Fix. Created 3 years, 8 months 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 | ui/events/devices/x11/device_data_manager_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/devices/x11/device_data_manager_x11.h
diff --git a/ui/events/devices/x11/device_data_manager_x11.h b/ui/events/devices/x11/device_data_manager_x11.h
index 3d63c46556af95848d8d9110ea79e77741609898..587e60059823f6018ec49da52e35c240fc8ab18a 100644
--- a/ui/events/devices/x11/device_data_manager_x11.h
+++ b/ui/events/devices/x11/device_data_manager_x11.h
@@ -301,6 +301,16 @@ class EVENTS_DEVICES_X11_EXPORT DeviceDataManagerX11
AxisInfo vertical, horizontal;
};
+ // Information from XIValuatorClassInfo.
+ struct ValuatorInfo {
+ // The valuator number.
+ int number = -1;
+ // The valuator min value.
+ double min = 0.0;
+ // The valuator max value.
+ double max = 0.0;
+ };
+
DeviceDataManagerX11();
~DeviceDataManagerX11() override;
@@ -359,9 +369,9 @@ class EVENTS_DEVICES_X11_EXPORT DeviceDataManagerX11
// Number of valuators on the specific device.
int valuator_count_[kMaxDeviceNum];
- // Index table to find the valuator for DataType on the specific device
- // by valuator_lookup_[device_id][data_type].
- std::vector<int> valuator_lookup_[kMaxDeviceNum];
+ // Index table to find valuator number, min and max for DataType on the
+ // specific device by valuator_lookup_[device_id][data_type].
+ std::vector<ValuatorInfo> valuator_lookup_[kMaxDeviceNum];
// Indicates if the user has disabled high precision scrolling support.
bool high_precision_scrolling_disabled_;
@@ -374,11 +384,6 @@ class EVENTS_DEVICES_X11_EXPORT DeviceDataManagerX11
// by data_type_lookup_[device_id][valuator].
std::vector<int> data_type_lookup_[kMaxDeviceNum];
- // Index table to find the min & max value of the Valuator on a specific
- // device.
- std::vector<double> valuator_min_[kMaxDeviceNum];
- std::vector<double> valuator_max_[kMaxDeviceNum];
-
// Table to keep track of the last seen value for the specified valuator for
// a specified slot of a device. Defaults to 0 if the valuator for that slot
// was not specified in an earlier event. With MT-B/XI2.2, valuators in an
« no previous file with comments | « no previous file | ui/events/devices/x11/device_data_manager_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698