[gpm] Getting wheel events working again

Rod Berriman rod@optimail.com.au
Thu Mar 13 12:09:20 CET 2008

After consideration, and some testing, I propose a minimal patch to get
the imps2 wheel operating again.

The essence of this patch is just a bug fix to one line in gpm.c that was
causing some wheel events to be suppressed:

-   if (!event->dx && !event->dy && (event->buttons==oldB))
+   /* rodney 13/mar/2008 wheel movement similar to mouse movement
+    * must also be excluded from time (click) processing */
+   if (!event->dx && !event->dy
+       && !event->wdx  && !event->wdy
+       && (event->buttons==oldB) )

Full patch is attached. Mainly added some comments here and there.


My next point may be controversial, but I suggest to rename the 5 patches
in patches/todo/imwheel as patches/historical/imwheel

My reasoning is that:
1. the patches are too complicated. For example, who would need emulation
of the wheel on non-wheel mice?
2. the patches overlook the fact that there is already support for 2
wheels in the Gpm_Event, in the fields wdy and wdx. I don't see the need
to add more fields to the Gpm_Event.
3. there is some code about the wheel generating button events: I can't
understand why this was needed. I think the original idea, that the wheel
is a movement event, similar to the x/y movement of the mouse, makes a lot
of sense, and this is enough.

Comments most welcome,

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: imps2-wheel-patch.txt
Url: http://lists.linux.it/pipermail/gpm/attachments/20080313/983fb5f2/attachment.txt 

More information about the gpm mailing list