aboutsummaryrefslogtreecommitdiff
path: root/x11-drivers
diff options
context:
space:
mode:
authorFlorent Thoumie <flz@FreeBSD.org>2008-03-13 12:06:45 +0000
committerFlorent Thoumie <flz@FreeBSD.org>2008-03-13 12:06:45 +0000
commit81c87568a53314cf9e78c95e1aa34f18799d44fc (patch)
tree73fe196b2d70236d9a630af93c29fbdba4d150bf /x11-drivers
parent08e6ff49f5ec6ea4675efb95dd5134748fd80364 (diff)
downloadports-81c87568a53314cf9e78c95e1aa34f18799d44fc.tar.gz
ports-81c87568a53314cf9e78c95e1aa34f18799d44fc.zip
Add patch to fix mouse pointer coordinates.
PR: ports/119820 Submitted by: Hiroto Kagotani <hiroto.kagotani@gmail.com>
Notes
Notes: svn path=/head/; revision=208933
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/xf86-input-vmmouse/Makefile1
-rw-r--r--x11-drivers/xf86-input-vmmouse/files/patch-src_vmmouse.c28
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);
+ }