ports/119820: [PATCH] x11-drivers/xf86-input-vmmouse: incorrect mouse pointer cordinate
Hiroto Kagotani
hiroto.kagotani at gmail.com
Sun Jan 20 09:40:02 UTC 2008
>Number: 119820
>Category: ports
>Synopsis: [PATCH] x11-drivers/xf86-input-vmmouse: incorrect mouse pointer cordinate
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Jan 20 09:40:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Hiroto Kagotani
>Release: 6.2-RELEASE-p5
>Organization:
Okayama Univ.
>Environment:
FreeBSD myhost.mydomain 6.2-RELEASE-p5 FreeBSD 6.2-RELEASE-p5 #17: Sat Jun 9 13:32:51 JST 2007 root at myhost.mydomain:/usr/obj/usr/src/sys/MYHOST i386
>Description:
vmmouse mouse driver does not correctly work with xorg-server under VMware Player/Workstation environment. xorg-server can not obtain the correct coordinates of the mouse pointer. The reason and the workaround are described in:
http://groups.google.com/group/lucky.freebsd.questions/browse_thread/thread/9d44a3f3068edd07/df2ce51aa42be533
This workaround should likely be removed when the next xorg-server is released.
>How-To-Repeat:
Install FreeBSD + xorg as a guest OS of VMware Player.
Install xf86-input-vmmouse and xf86-video-vmware drivers.
Configure xorg to use vmmouse and vmware drivers.
Run X.
You find you can not click any place while the mouse pointer is visible and moving.
>Fix:
Patch from http://groups.google.com/group/lucky.freebsd.questions/browse_thread/thread/9d44a3f3068edd07/df2ce51aa42be533
diff -Nru ../xf86-input-vmmouse.orig/files/patch-src_vmmouse.c ./files/patch-src_vmmouse.c
--- ../xf86-input-vmmouse.orig/files/patch-src_vmmouse.c Thu Jan 1 09:00:00 1970
+++ ./files/patch-src_vmmouse.c Sun Jan 20 17:11:22 2008
@@ -0,0 +1,28 @@
+--- src/vmmouse.c.orig Wed Sep 26 08:11:47 2007
++++ src/vmmouse.c Sun Jan 20 17:10:54 2008
+@@ -964,8 +964,11 @@
+ VMMOUSE_INPUT_DATA vmmouseInput;
+ int ps2Buttons = 0;
+ int numPackets;
++ VMMousePrivPtr mPriv;
++ double factorX, factorY;
+
+ pMse = pInfo->private;
++ mPriv = pMse->mousePriv;
+ while((numPackets = VMMouseClient_GetInput(&vmmouseInput))){
+ if (numPackets == VMMOUSE_ERROR) {
+ VMMouseClient_Disable();
+@@ -990,6 +993,13 @@
+ dy = vmmouseInput.Y;
+ dz = (char)vmmouseInput.Z;
+ dw = 0;
++
++ /* X server 1.4.0 does not call VMMouseConvertProc() so we scale coordinates here */
++ factorX = ((double) screenInfo.screens[mPriv->screenNum]->width) / (double) 65535;
++ factorY = ((double) screenInfo.screens[mPriv->screenNum]->height) / (double) 65535;
++ dx = dx * factorX + 0.5;
++ dy = dy * factorY + 0.5;
++
+ /* post an event */
+ pMse->PostEvent(pInfo, buttons, dx, dy, dz, dw);
+ }
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list