mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 06:33:31 +00:00
9ca214eee8
Move button-event reporting behind pointer-position update. This is just a quickfix to restore correct pointer emulation with dde_linux usb_drv. It does not change usb_hid_drv because the approach is a questionable workaround of the current input event handling, which reports events promptly on occurrence of inputs events and ignores synchronization events completely. The original contrib code reported the button press before absolute x and y positioning followed by a sync event. Issue #3019
25 lines
636 B
Diff
25 lines
636 B
Diff
--- a/drivers/input/input-mt.c
|
|
+++ b/drivers/input/input-mt.c
|
|
@@ -217,10 +217,6 @@
|
|
count++;
|
|
}
|
|
|
|
- input_event(dev, EV_KEY, BTN_TOUCH, count > 0);
|
|
- if (use_count)
|
|
- input_mt_report_finger_count(dev, count);
|
|
-
|
|
if (oldest) {
|
|
int x = input_mt_get_value(oldest, ABS_MT_POSITION_X);
|
|
int y = input_mt_get_value(oldest, ABS_MT_POSITION_Y);
|
|
@@ -236,6 +232,10 @@
|
|
if (test_bit(ABS_MT_PRESSURE, dev->absbit))
|
|
input_event(dev, EV_ABS, ABS_PRESSURE, 0);
|
|
}
|
|
+
|
|
+ input_event(dev, EV_KEY, BTN_TOUCH, count > 0);
|
|
+ if (use_count)
|
|
+ input_mt_report_finger_count(dev, count);
|
|
}
|
|
EXPORT_SYMBOL(input_mt_report_pointer_emulation);
|
|
|