[gpm]Re: [eeprom@bol.com.br: Re: Links 2.0pre5: Mouse smooth]

Alessandro Rubini rubini@gnu.org
Sat, 8 Jun 2002 14:09:10 +0200


>> I read gpm source and I expect that it will be 15-lines patch on gpm, no
>> need to make new API. I will try it now, as soon as I compile and install
>> new gpm.
> 
> If you will change size of the structure, won't you break old programs i.e.
> playing with the Gpm_Event relying on its sizeof?

If I understood it right, he doesn't want to change the structure but
just repeat raw data. Changing the structure is bad, and it already
happened (not in the upstream version), but this is not an issue
here.

The problem with repeating data is that it's completely useless. Just
like /dev/mouse (whatever that is, serial, ps2, usb...) is not
virtualized across consoles, neither /dev/gpmdata or any other fifo
will be.

On the other hand, Gpm_Event *is* virtualized, and that's exactly what
it is there for: to allow for several applications using the mouse on
several text consoles without interfering in any way.  You can't have
that kind of service without a connection-oriented communication
(i.e., a socket, like /dev/gpmctl, but not a fifo lile /dev/gpmdata).

Sure you can pass raw data through a socket, but what is the
advantage?  All applications must know every protocol and deal with
each of them.  If Gpm_Event as it is now is not sufficient any more
(due to new mice with wheels and whistles), please design a new
structure and make gpm-2.* (not compatible with gpm-1.*).  Avoiding
centralization of problems is doomed to fail.

If you want virtualization across consoles of something different from
a socket, then you need to make it a device (just like the console
is). I did it with kmouse (still on tsx-11.mit.edu/pub/kmouse I think)
but then abandoned the project for lack of time on my side and of
interest in general.

But again, it's silly to just virtualize the raw data stream, just
like it would be silly to pass keycodes to applications' stdin instead
of ascii (not because it's more difficult, because it's unpredictable:
I have at least 5 different keyboards out there: *every* keycode is
different (think pc vs. old-sparc vs. old-mac) but applications can
ignore them as the see the *meaning* of each key, not the protocol.

/alessandro, original author of gpm but not the maintainer since 2y+ ago