From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BEcME-0003yQ-1k for qemu-devel@nongnu.org; Fri, 16 Apr 2004 19:02:50 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BEcLg-0003vL-OB for qemu-devel@nongnu.org; Fri, 16 Apr 2004 19:02:47 -0400 Received: from [192.35.232.241] (helo=zircon.austin.ibm.com) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BEcLg-0003v5-87 for qemu-devel@nongnu.org; Fri, 16 Apr 2004 19:02:16 -0400 Received: from grandecom.net (IBM-2FTS9RJ4U6S-009053187181.austin.ibm.com [9.53.187.181]) by zircon.austin.ibm.com (AIX5.1/8.11.6p2/8.9.3) with ESMTP id i3GN2CH48922 for ; Fri, 16 Apr 2004 18:02:12 -0500 Message-ID: <4080646A.20006@grandecom.net> Date: Fri, 16 Apr 2004 17:55:38 -0500 From: Gregory Alexander MIME-Version: 1.0 Subject: Re: [Qemu-devel] WinXP mouse patch References: <407F13C9.1000000@easynet.be> In-Reply-To: <407F13C9.1000000@easynet.be> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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