diff options
author | flz <flz@FreeBSD.org> | 2008-03-13 20:06:45 +0800 |
---|---|---|
committer | flz <flz@FreeBSD.org> | 2008-03-13 20:06:45 +0800 |
commit | d736e90621560c190ed91843ba5f7bc4f57048a3 (patch) | |
tree | 20c1424bbe1c473c59a2fda6ec13668ad35be1a8 /x11-drivers | |
parent | da63f69749a89a7d614123ba19d87e5465b0d441 (diff) | |
download | freebsd-ports-gnome-d736e90621560c190ed91843ba5f7bc4f57048a3.tar.gz freebsd-ports-gnome-d736e90621560c190ed91843ba5f7bc4f57048a3.tar.zst freebsd-ports-gnome-d736e90621560c190ed91843ba5f7bc4f57048a3.zip |
Add patch to fix mouse pointer coordinates.
PR: ports/119820
Submitted by: Hiroto Kagotani <hiroto.kagotani@gmail.com>
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); + } |