From owner-freebsd-bugs Sat Feb 8 18:10:14 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id SAA15915 for bugs-outgoing; Sat, 8 Feb 1997 18:10:14 -0800 (PST) Received: from nasu.utsunomiya-u.ac.jp (nasu.utsunomiya-u.ac.jp [160.12.128.3]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id SAA15906 for ; Sat, 8 Feb 1997 18:10:05 -0800 (PST) Received: from outmail.utsunomiya-u.ac.jp (outmail.utsunomiya-u.ac.jp [160.12.196.3]) by nasu.utsunomiya-u.ac.jp (8.8.4+2.7Wbeta4/3.5Wpl3) with ESMTP id LAA12181; Sun, 9 Feb 1997 11:09:11 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (LsnSRTaEQpVw5Yt3hu3K52U/SqB8PTmm@zodiac.mech.utsunomiya-u.ac.jp [160.12.33.1]) by outmail.utsunomiya-u.ac.jp (8.8.4+2.7Wbeta4/3.5Wpl3) with ESMTP id LAA25517; Sun, 9 Feb 1997 11:09:10 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (zenith.mech.utsunomiya-u.ac.jp [160.12.33.60]) by zodiac.mech.utsunomiya-u.ac.jp (8.7.6+2.6Wbeta7/3.4W/zodiac-May96) with ESMTP id LAA11763; Sun, 9 Feb 1997 11:13:00 +0900 (JST) Message-Id: <199702090213.LAA11763@zodiac.mech.utsunomiya-u.ac.jp> To: Leonard Chua cc: David Nugent , Zach Heilig , yokota@zodiac.mech.utsunomiya-u.ac.jp, freebsd-bugs@freebsd.org Subject: Re: moused and X11R6 In-reply-to: Your message of "Sat, 08 Feb 1997 15:29:00 PST." References: Date: Sun, 09 Feb 1997 11:12:57 +0900 From: Kazutaka YOKOTA Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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. Interesting. I haven't heard about such mice before... Which company makes such beast? >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" Well, with moused running, you should be using: Protocol "MouseSystems" Device "/dev/sysmouse" Your XF86Confing is OK, if you don't use moused. >An interesting point is that (even without moused), X will somehow >redetect the mouse as a 3button mouse and switch it to 3button mode. Hmm.. Does XFree86 server have such functionality? I didn't know. >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. >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. When you run moused, you NEED to tell XFree86 server not to read the serial port (or the PS/2 mouse port, or the Bus mouse port) directly. >It does >not take mouse events from the console driver. XFree86 server must be instructed to do just that... >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. I think your observation is right. X and moused are fighting over mouse data under the configuration specified by your XF86Config. Kazu