mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
libinput: add support for touchscreen set matrix
My android pad emit a strange touch input from libinput, need to rotate it in 270 degree clockwise to fix.
This commit is contained in:
parent
8b8652e2b3
commit
bd4d92bad8
5 changed files with 28 additions and 7 deletions
|
|
@ -25,6 +25,7 @@ libinput_category_init(struct libinput_category *l)
|
|||
l->dwt = -1;
|
||||
l->click_method = -1;
|
||||
l->send_events_mode = -1;
|
||||
l->no_calibration_matrix = true;
|
||||
}
|
||||
|
||||
enum lab_libinput_device_type
|
||||
|
|
|
|||
|
|
@ -611,6 +611,12 @@ fill_libinput_category(char *nodename, char *content)
|
|||
} else if (!strcasecmp(nodename, "sendEventsMode")) {
|
||||
current_libinput_category->send_events_mode =
|
||||
get_send_events_mode(content);
|
||||
} else if (!strcasecmp(nodename, "calibrationMatrix")) {
|
||||
float *m = current_libinput_category->calibration_matrix;
|
||||
int r = sscanf(content, "%f%f%f%f%f%f", &m[0], &m[1], &m[2], &m[3], &m[4], &m[5]);
|
||||
if (r == 6) {
|
||||
current_libinput_category->no_calibration_matrix = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue