mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-18 16:04:40 -04:00
distinguish touch pad and touch screen
Signed-off-by: wangxuanxuan <wangxuanxuan9@huawei.com>
This commit is contained in:
@@ -211,8 +211,10 @@ size_t InputHub::CollectEvent(RawEvent* buffer, size_t& capacity, Device* device
|
||||
std::vector<bool> needFilted(capacity, false);
|
||||
bool isTouchEvent = false;
|
||||
if ((device->classes & INPUT_DEVICE_CLASS_TOUCH_MT) || (device->classes & INPUT_DEVICE_CLASS_TOUCH)) {
|
||||
isTouchEvent = true;
|
||||
HandleTouchScreenEvent(readBuffer, count, needFilted);
|
||||
if (device->identifier.relTypes.size() != 0) {
|
||||
isTouchEvent = true;
|
||||
HandleTouchScreenEvent(readBuffer, count, needFilted);
|
||||
}
|
||||
}
|
||||
|
||||
RawEvent* event = buffer;
|
||||
|
||||
Reference in New Issue
Block a user