diff options
Diffstat (limited to 'x11-drivers')
-rw-r--r-- | x11-drivers/xf86-input-vmmouse/Makefile | 1 | ||||
-rw-r--r-- | x11-drivers/xf86-input-vmmouse/files/patch-src_vmmouse.c | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/x11-drivers/xf86-input-vmmouse/Makefile b/x11-drivers/xf86-input-vmmouse/Makefile index 117032301b6f..c870b92a9426 100644 --- a/x11-drivers/xf86-input-vmmouse/Makefile +++ b/x11-drivers/xf86-input-vmmouse/Makefile @@ -7,6 +7,7 @@ PORTNAME= xf86-input-vmmouse PORTVERSION= 12.4.3 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-input-vmmouse/files/patch-src_vmmouse.c b/x11-drivers/xf86-input-vmmouse/files/patch-src_vmmouse.c new file mode 100644 index 000000000000..94d61e4e9c0d --- /dev/null +++ b/x11-drivers/xf86-input-vmmouse/files/patch-src_vmmouse.c @@ -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); + } |