On Wed, 2 Feb 2005, Dmitry Torokhov wrote: > On Wed, 02 Feb 2005 13:52:03 -0800 (PST), Peter Osterlund > <[EMAIL PROTECTED]> wrote: > > > > if (mousedev->touch) { > > + size = dev->absmax[ABS_X] - dev->absmin[ABS_X]; > > + if (size == 0) size = xres; > > Sorry, missed this piece first time around. Since we don't want to > rely on screen size anymore I think we should set size = 256 * > FRACTION_DENOM / 2 if device limits are not set up to just report raw > coords. What do you think?
I think that this case can't happen until we add support for some other touchpad that doesn't set the absmin/absmax variables. Both alps and synaptics currently set them. However, the fallback value should definitely not depend on FRACTION_DENOM, since this constant doesn't affect the mouse speed at all. It only affects how accurately we store the fractional part of dx and dy. Ideally FRACTION_DENOM should be as large as possible without causing arithmetic overflow. In practice, 128 seemed to be plenty enough. So, the fallback value should be set to the estimated absmax-absmin value for the hypothetical future touchpad driver that also hypothetically doesn't set this value itself. I have no idea how to estimate this value though, which is why I just used xres. ;) -- Peter Osterlund - [EMAIL PROTECTED] http://web.telia.com/~u89404340 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/