diff options
author | marha <marha@users.sourceforge.net> | 2012-03-23 10:05:55 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-03-23 10:05:55 +0100 |
commit | 0f834b91a4768673833ab4917e87d86c237bb1a6 (patch) | |
tree | 363489504ed4b2d360259b8de4c9e392918e5d02 /xorg-server/hw/xnest/Pointer.c | |
parent | fc72edebf875378459368c5383d9023730cbca54 (diff) | |
download | vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2 vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip |
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'xorg-server/hw/xnest/Pointer.c')
-rw-r--r-- | xorg-server/hw/xnest/Pointer.c | 89 |
1 files changed, 44 insertions, 45 deletions
diff --git a/xorg-server/hw/xnest/Pointer.c b/xorg-server/hw/xnest/Pointer.c index fdc6181e9..a2ee90064 100644 --- a/xorg-server/hw/xnest/Pointer.c +++ b/xorg-server/hw/xnest/Pointer.c @@ -34,64 +34,63 @@ is" without express or implied warranty. #include "Args.h" #include "xserver-properties.h" -#include "exevents.h" /* For XIGetKnownProperty */ +#include "exevents.h" /* For XIGetKnownProperty */ DeviceIntPtr xnestPointerDevice = NULL; void -xnestChangePointerControl(DeviceIntPtr pDev, PtrCtrl *ctrl) +xnestChangePointerControl(DeviceIntPtr pDev, PtrCtrl * ctrl) { - XChangePointerControl(xnestDisplay, True, True, - ctrl->num, ctrl->den, ctrl->threshold); + XChangePointerControl(xnestDisplay, True, True, + ctrl->num, ctrl->den, ctrl->threshold); } int xnestPointerProc(DeviceIntPtr pDev, int onoff) { - CARD8 map[MAXBUTTONS]; - Atom btn_labels[MAXBUTTONS] = {0}; - Atom axes_labels[2] = {0}; - int nmap; - int i; + CARD8 map[MAXBUTTONS]; + Atom btn_labels[MAXBUTTONS] = { 0 }; + Atom axes_labels[2] = { 0 }; + int nmap; + int i; - switch (onoff) - { - case DEVICE_INIT: - nmap = XGetPointerMapping(xnestDisplay, map, MAXBUTTONS); - for (i = 0; i <= nmap; i++) - map[i] = i; /* buttons are already mapped */ + switch (onoff) { + case DEVICE_INIT: + nmap = XGetPointerMapping(xnestDisplay, map, MAXBUTTONS); + for (i = 0; i <= nmap; i++) + map[i] = i; /* buttons are already mapped */ - 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); + 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); + axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); + axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); - XGetPointerControl(xnestDisplay, - &defaultPointerControl.num, - &defaultPointerControl.den, - &defaultPointerControl.threshold); - InitPointerDeviceStruct(&pDev->public, map, nmap, btn_labels, - xnestChangePointerControl, - GetMotionHistorySize(), 2, axes_labels); - break; - case DEVICE_ON: - xnestEventMask |= XNEST_POINTER_EVENT_MASK; - for (i = 0; i < xnestNumScreens; i++) - XSelectInput(xnestDisplay, xnestDefaultWindows[i], xnestEventMask); - break; - case DEVICE_OFF: - xnestEventMask &= ~XNEST_POINTER_EVENT_MASK; - for (i = 0; i < xnestNumScreens; i++) - XSelectInput(xnestDisplay, xnestDefaultWindows[i], xnestEventMask); - break; - case DEVICE_CLOSE: - break; + XGetPointerControl(xnestDisplay, + &defaultPointerControl.num, + &defaultPointerControl.den, + &defaultPointerControl.threshold); + InitPointerDeviceStruct(&pDev->public, map, nmap, btn_labels, + xnestChangePointerControl, + GetMotionHistorySize(), 2, axes_labels); + break; + case DEVICE_ON: + xnestEventMask |= XNEST_POINTER_EVENT_MASK; + for (i = 0; i < xnestNumScreens; i++) + XSelectInput(xnestDisplay, xnestDefaultWindows[i], xnestEventMask); + break; + case DEVICE_OFF: + xnestEventMask &= ~XNEST_POINTER_EVENT_MASK; + for (i = 0; i < xnestNumScreens; i++) + XSelectInput(xnestDisplay, xnestDefaultWindows[i], xnestEventMask); + break; + case DEVICE_CLOSE: + break; } - return Success; + return Success; } |