From: Vojtech P. <vo...@su...> - 2001-07-29 18:31:54
|
On Tue, Jul 24, 2001 at 08:21:43PM -0700, Charles Duffy wrote: > On Tue, Jul 24, 2001 at 07:59:32PM -0700, James Simmons wrote: > > > This patch stops mousedev from dividing by zero when handling events > > > from (faulty?) drivers which send ABS_* events but don't set > > > dev->abs{min,max}. > > > > Hm. I have done this :-/ Shouldn't it print a error instead? > > Not necessarily -- situations can exist where the min/max absolute > values are unavailable and the resolution of the touchpanel matches > that of the LCD it covers (and thus no scaling is, literally, good > scaling). While one could try have the user enter the appropriate > value at configure- or module load-time, the easiest solution here is > simply to allow the touchpanel driver not to provide a resolution if > one is unavailable. I don't think this is good. For absolute devices there should be a defined range. It's not just mousedev who uses the values. > The presumption that a touchpanel's resolution matches that of its > correspending LCD is frequently correct -- I've got four touchpanel > devices in the testing lab over here; not one of them has a resolution > different from that of the LCD panel it's connected to. I have a transparent Gunze touchpanel here whose physical resolution is 1024x1024 (although it has a 3:4 aspect ratio), on a 800x600 TFT screen. So there exist panels for which you need to scale. But you shouldn't need mousedev for touchpanels in the first place. > Thus, I'd like to have this be Correct Behaviour for an event handler. > (Some changes are also needed to tsdev.c; I'd be glad to provide > them). I think much better would be letting mousedev know both the correct screen and touchpanel resolution. -- Vojtech Pavlik SuSE Labs |