Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Feb 1997 15:29:00 -0800 (PST)
From:      Leonard Chua <lenc@earth.infinetconsulting.com>
To:        David Nugent <davidn@labs.usn.blaze.net.au>
Cc:        Zach Heilig <zach@blizzard.gaffaneys.com>, David Nugent <davidn@labs.usn.blaze.net.au>, yokota@zodiac.mech.utsunomiya-u.ac.jp, freebsd-bugs@freebsd.org
Subject:   Re: moused and X11R6
Message-ID:  <Pine.BSF.3.91.970208145003.15170A@earth.infinetconsulting.com>
In-Reply-To: <19970208201732.37402@usn.blaze.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 8 Feb 1997, David Nugent wrote:
  
> On Feb 02, 1997 at 01:51:01AM, Zach Heilig wrote:
> What type of mouse do you have? The type in /etc/sysconfig
> (for moused) should match the type of the mouse you're using.
> moused always emulates a mousesystems mouse, so if you're
> using /dev/sysmouse, then XFree should use the mousesystems
> type.
>

Here's my 
setup:
I use a generic mouse that can autoswitch between 2button microsoft mode
and 3 button mousesystems mode. There is no physical switch on the mouse to
select the modes. It depends on what instructions it's fed.

I run moused as 'moused -p /dev/mouse -t microsoft'
/dev/mouse is a symbolic link to /dev/cuaa0
I have XF86Config using:
   Protocol        "Microsoft"
   Device          "/dev/mouse"
An interesting point is that (even without moused), X will somehow
redetect the mouse as a 3button mouse and switch it to 3button mode.
I have tried getting moused to work in mousesystems mode, but all I get
are jerky motions, no mouse cursor and garbage whenever I move the mouse.

Another note is that with moused on, and at an X session, clicking
the right mouse button (or any other for that matter) in an Xterm window 
will not cause problems. The mouse hangs only when clicking on the root 
window.

(more below)
>>It works like this:
>>
>>moused handles the *real* mouse device, and "converts" these
>>into mousesystems events, then emulates a "real" mouse to
>>everything that uses it. In the meatime, It can affect the
>>console device as well if you have mouse actions on via
>>vidcontrol.
>>
>>e.g (for a serial mouse):
>>
>>
>>/dev/cuaa0 -> moused
>>             |
>>             /dev/mouse
>>               |
>>               +-- vidcontrol
>>               |
>>               +-- xfree
>
>Actually, it's `/dev/sysmouse' rather than `/dev/mouse', unless you
>have made a symbolic link from `/dev/mouse' to `/dev/sysmouse'...

I took a cursory glance at the moused.c code and have some 
questions/assumptions: (feel free to slam me if I'm wrong)
>From moused.c:
** Mouse daemon : listens to serial port for mouse data stream,
** interprets same and passes ioctls off to the console driver.
I understand XF86 will read off the serial port as well. It does
not take mouse events from the console driver. I say this because
for an X application which uses the console (e.g. xterm), the mouse
did not hang (as mentioned above). But at the root window, X reads
the mouse events directly and so hangs. I also ran moused in debug mode.
What I noticed was that at an X session, moused continued to read
mouse events fine even when the mouse "hung" at the X root window. 
My guess then is that X detected a mouse event, but before it could
receive any more event info, moused captured it first. Then, X's mouse 
would be hung waiting for the event to complete.

Of course all this could be just insane ravings caused by too much 
monitor radiation :)

Cheers.
Len




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.970208145003.15170A>