<div dir="ltr"><div>Searching for uses of fake_resolution and equating the two results gives scale factors between resolution and the controller range (called width and height here):<br></div><div><br>evdev-mt-touchpad-buttons.c:535 bottom_area.top_edge<br><br>        height * 0.15 / yres <= 10 (to choose the same branch as fake does now)<br>        yres * 10 >= height * 0.15<br>        yres >= height / 66.66<br><br>evdev-mt-touchpad-buttons.c:572 top_area.bottom_edge<br><br>        yoffset + topsize_mm * yres == height * topsize_pct + yoffset<br>        yres * topsize_mm == height * topsize_pct<br>        yres * 10 * topbutton_size_mult == height * .15 * topbutton_size_mult<br>        yres * 10 = height * .15<br>        yres = height / 66.66<br><br>evdev-mt-touchpad-buttons.c:743 motion_dist.scale_coeff<br><br>        diagonal * BUTTON_MOTION_MAGIC == 1/xres == 1/yres<br>        1/xres == 1/yres == diagonal * 0.007<br>        (This is inverted! Correct for assumed mistake:)<br>        xres == yres == diagonal * 0.007<br>        (assume touchpad is 4x3. Then width == diagonal * 4/5 and height == diagonal * 3/5)<br>        xres = width / 114.28<br>        yres = height / 85.71<br><br>evdev-mt-touchpad-buttons.c:836 clickfinger_distance<br><br>        width * 0.3 == xres * 40 (equate the two things x is compared with)<br>        xres = width * 0.3 / 40<br>        xres = width / 133.33<br><br>        height * 0.3 == yres * 20 (equate the two things y is compared with)<br>        yres = height * 0.3 / 20<br>        yres = height / 66.667<br><br>evdev-mt-touchpad.c:1285 accel.scale_coeff<br><br>        (DEFAULT_MOUSE_DPI/25.4) / xres == DEFAULT_ACCEL_NUMERATOR / diagonal (same for yres)<br>        (1000/25.4) / xres == 3000 / diagonal<br>        xres = yres = diagonal * (1000 / 25.4 / 3000)<br>        (assume same 4x3 aspect of touchpad as above)<br>        xres = width / 91.5<br>        yres = height / 68.625<br><br>evdev-mt-touchpad.c:1497 hysteresis_margin<br><br>        xres / 2 == diagonal / DEFAULT_HYSTERESIS_MARGIN_DENOMINAOTR (same for yres)<br>        xres / 2 = diagonal / 700<br>        xres = diagonal / 350<br>        (assume same 4x3 aspect of touchpad as above)<br>        xres = width / 280<br>        yres = height / 210<br>        (this seems to be an out-liner and probably should be ignored)<br><br>Most popular height divisor is 66.667. This makes sense as it is a 6.6cm tall touch pad.<br><br>If touchpad is 3x2 then width divisor is a nice 100 which also seems to be near some of the computed values.<br><br></div>See attached patch for the result. Note that this needs to be tested!<br><br></div>