[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] WinXP mouse patch

From: Gregory Alexander
Subject: Re: [Qemu-devel] WinXP mouse patch
Date: Fri, 16 Apr 2004 17:55:38 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113

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.


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 ..

Happy testing,


--- 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))
+    printf("MOUSE %d %d %d %d\n", dx, dy, dz, buttons_state);
     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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]