All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregory Alexander <yakovlev@grandecom.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] WinXP mouse patch
Date: Fri, 16 Apr 2004 17:55:38 -0500	[thread overview]
Message-ID: <4080646A.20006@grandecom.net> (raw)
In-Reply-To: <407F13C9.1000000@easynet.be>

I made this same change in bochs to make the mouse usable there.  At 
least under linux I think it has to do with X sending the events even 
when they're not really needed.  From Mike Nordell's post, it sounds 
like SDL just blindly forwards those events on without filtering.

Also, (although I don't know much about the qemu event queue) it might 
make sense to add the capability to merge multiple outstanding mouse 
events into a single event.  This made a BIG difference on bochs, and 
could help in QEMU as well, if for no other reason than saving CPU cycles.

GREG



Mark Jonckheere wrote:
> The following patch against the latest CVS (13 april) resolved
> for me the slow mouse movements in WinXP. It removes from the
> datastream dummy mouse-events that contain no movement or
> button-change. This is probably the same problem as in Win2K.
> 
> to apply the patch:
> save attachment
> cd qemu/hw
> patch -p0 < /path/to/pckbd.diff
> cd ..
> make
> 
> Happy testing,
> Mark.
> 
> 
> ------------------------------------------------------------------------
> 
> --- pckbd.c.orig	Sat Apr 10 21:04:48 2004
> +++ pckbd.c	Fri Apr 16 00:24:27 2004
> @@ -442,9 +442,14 @@
>      if (!(s->mouse_status & MOUSE_STATUS_ENABLED))
>          return;
>  
> +#ifdef DEBUG_MOUSE
> +    printf("MOUSE %d %d %d %d\n", dx, dy, dz, buttons_state);
> +#endif
>      s->mouse_dx += dx;
>      s->mouse_dy -= dy;
>      s->mouse_dz += dz;
> +    if (s->mouse_dx == 0 && s->mouse_dy == 0 && s->mouse_dz == 0 && s->mouse_buttons == buttons_state)
> +	return;
>      s->mouse_buttons = buttons_state;
>      
>      if (!(s->mouse_status & MOUSE_STATUS_REMOTE) &&
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://mail.nongnu.org/mailman/listinfo/qemu-devel

  reply	other threads:[~2004-04-16 23:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-15 22:59 [Qemu-devel] WinXP mouse patch Mark Jonckheere
2004-04-16 22:55 ` Gregory Alexander [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-04-16  5:17 Mike Nordell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4080646A.20006@grandecom.net \
    --to=yakovlev@grandecom.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.