sysmouse/tty weirdness

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Tue Jan 31 15:08:06 PST 2006


Matthew Dillon wrote:

    Well, fix the program first.  When you print out the
    raw data iterate from total to total + readcnt, not
    from 0 to total + readcnt.
that's on purpose so I see the buffered bytes stacking up.

    The if (total >= sizetab[level]) ... needs to be
    while (total >= sizetab[level]), otherwise if enough
    mouse movements build up you will overflow your buffer.
yea right, though that didn't happen yet (with a 50 bytes buffer).

    It should still have worked reasonably well, but 
    perhaps fixing those two issues will make the problem
    more obvious.
it just got weirder...  for SOME reason if i start it while X has the 
focus (X also using sysmouse, mouse works there, although without scroll 
wheel), it will display correct output.  running a hd /dev/sysmouse will 
also nicely print along.  Note that this works when running from xterm 
as well when running via ssh.

Now comes the funny part:  switch to a console vty.  still works!  also 
another instance will work correctly...  until I quit all running 
showmouse/hexdump and rerun them...  all in/out going totally wrong 
again...  until (no, you don't believe this) I switch to X.  As soon as 
I switch to X again everything works again.  So X is doing *something* 
which makes sysmouse output correct data.

I guess I'm not far from the problem, probably some initialization which 
isn't documented or such (but I know it worked before!)

cheers
  simon
--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \




More information about the Kernel mailing list