diff options
author | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
commit | 81f91c615982e50bb62708201569c33a3cd3d973 (patch) | |
tree | 4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/hw/xnest/Pointer.c | |
parent | b571a562410f565af2bdde52d9f7f9a23ffae04f (diff) | |
parent | a915739887477b28d924ecc8417ee107d125bd6c (diff) | |
download | vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2 vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip |
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/hw/xnest/Pointer.c')
-rw-r--r-- | xorg-server/hw/xnest/Pointer.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/xorg-server/hw/xnest/Pointer.c b/xorg-server/hw/xnest/Pointer.c index 8f764a624..4de467391 100644 --- a/xorg-server/hw/xnest/Pointer.c +++ b/xorg-server/hw/xnest/Pointer.c @@ -33,6 +33,9 @@ is" without express or implied warranty. #include "Pointer.h" #include "Args.h" +#include "xserver-properties.h" +#include "exevents.h" /* For XIGetKnownProperty */ + DeviceIntPtr xnestPointerDevice = NULL; void @@ -46,6 +49,8 @@ int xnestPointerProc(DeviceIntPtr pDev, int onoff) { CARD8 map[MAXBUTTONS]; + Atom btn_labels[MAXBUTTONS] = {0}; + Atom axes_labels[2] = {0}; int nmap; int i; @@ -55,9 +60,21 @@ xnestPointerProc(DeviceIntPtr pDev, int onoff) nmap = XGetPointerMapping(xnestDisplay, map, MAXBUTTONS); for (i = 0; i <= nmap; i++) map[i] = i; /* buttons are already mapped */ - InitPointerDeviceStruct(&pDev->public, map, nmap, + + btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); + btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); + btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); + btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); + btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); + btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT); + btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); + + axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); + axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); + + InitPointerDeviceStruct(&pDev->public, map, nmap, btn_labels, xnestChangePointerControl, - GetMotionHistorySize(), 2); + GetMotionHistorySize(), 2, axes_labels); break; case DEVICE_ON: xnestEventMask |= XNEST_POINTER_EVENT_MASK; |