cvs commit: src/sys/isa psm.c

Chris Dillon cdillon at
Tue Apr 6 09:25:05 PDT 2004

On Mon, 5 Apr 2004, Matthew D. Fuller wrote:

> On Sun, Apr 04, 2004 at 09:36:22AM -0700 I heard the voice of
> Mark Murray, and lo! it spake thus:
> > Without this, when the mouse gets confused, all sorts of crud gets
> > spammed all over the screen. With this, the mouse may appear dead
> > for a second or three, but it recovers silently.
> Mine doesn't just "appear dead" when these messages hit; it also
> slams a bunch of random movements and keypresses through.  Once it
> even managed to activate my menus and xlock my screen on me; that
> was a neat "Whoah, what did I touch?" moment.

I managed to move all kinds of toolbar buttons around and sometimes do
bad things every time I switched between machines on my KVM and
attempted to move the mouse.

Once I got tired of that, I ripped out all of the "discard a byte"
code and went straight to reinitialize on the first sign of trouble.
This has kept the event spamming down to a minimum after switching
back and forth from a Windows 2000 server with my KVM switch, which I
do constantly, but it didn't prevent it entirely like Windows does.
Whenever I switch over to Windows 2000, upon trying to use the mouse
my cursor will stay frozen with no evidence of event spamming until
the mouse is reinitialized a second later.

I don't understand the psm.c code enough to determine this myself,
but, can we check sync before we send out the events and completely
discard the data if it is out of sync?  If we do this already, why is
some of the bad event data making it through our mouse driver, but not
the mouse driver in Windows?  Do they perform some checks above and
beyond sync?

 Chris Dillon - cdillon(at)
 FreeBSD: The fastest, most open, and most stable OS on the planet
 - Available for IA32, IA64, AMD64, PC98, Alpha, and UltraSPARC architectures
 - PowerPC, ARM, MIPS, and S/390 under development

Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?

More information about the cvs-src mailing list