summaryrefslogtreecommitdiff
path: root/driver/xf86-input-ws/src
diff options
context:
space:
mode:
authorAlexandr Shadchin <shadchin@cvs.openbsd.org>2011-11-19 13:12:50 +0000
committerAlexandr Shadchin <shadchin@cvs.openbsd.org>2011-11-19 13:12:50 +0000
commit156a02ff31f27a7e58119d7d3ede963f8c604281 (patch)
tree1b4994ad5bb8823c8354acdc63d0cce47e63510b /driver/xf86-input-ws/src
parent53fb1e8eb12d88319c5a739361a92c68a5a1b3b5 (diff)
Replace WS_NOZMAP on WS_NOMAP.
ok matthieu@
Diffstat (limited to 'driver/xf86-input-ws/src')
-rw-r--r--driver/xf86-input-ws/src/ws.c16
-rw-r--r--driver/xf86-input-ws/src/ws.h10
2 files changed, 13 insertions, 13 deletions
diff --git a/driver/xf86-input-ws/src/ws.c b/driver/xf86-input-ws/src/ws.c
index e4a45556d..dae88fbe1 100644
--- a/driver/xf86-input-ws/src/ws.c
+++ b/driver/xf86-input-ws/src/ws.c
@@ -13,7 +13,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $OpenBSD: ws.c,v 1.48 2011/11/19 12:46:08 shadchin Exp $ */
+/* $OpenBSD: ws.c,v 1.49 2011/11/19 13:12:49 shadchin Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -83,8 +83,6 @@ static XF86ModuleVersionInfo VersionRec = {
{0, 0, 0, 0}
};
-#define WS_NOZMAP 0
-
XF86ModuleData wsModuleData = {&VersionRec,
SetupProc, TearDownProc };
@@ -146,7 +144,7 @@ wsPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
priv->buttons = DFLTBUTTONS;
buttons_from = X_DEFAULT;
}
- priv->negativeZ = priv->positiveZ = WS_NOZMAP;
+ priv->negativeZ = priv->positiveZ = WS_NOMAP;
s = xf86SetStrOption(pInfo->options, "ZAxisMapping", "4 5");
if (s) {
int b1, b2;
@@ -169,7 +167,7 @@ wsPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
}
free(s);
}
- priv->negativeW = priv->positiveW = WS_NOZMAP;
+ priv->negativeW = priv->positiveW = WS_NOMAP;
s = xf86SetStrOption(pInfo->options, "WAxisMapping", "6 7");
if (s) {
int b1, b2;
@@ -582,8 +580,8 @@ wsReadInput(InputInfoPtr pInfo)
xf86PostMotionEvent(pInfo->dev, 0, 0, 2,
dx, dy);
}
- if (dz && priv->negativeZ != WS_NOZMAP
- && priv->positiveZ != WS_NOZMAP) {
+ if (dz && priv->negativeZ != WS_NOMAP
+ && priv->positiveZ != WS_NOMAP) {
buttons &= ~(priv->negativeZ | priv->positiveZ);
if (dz < 0) {
DBG(4, ErrorF("Z -> button %d\n",
@@ -597,8 +595,8 @@ wsReadInput(InputInfoPtr pInfo)
buttons |= zbutton;
dz = 0;
}
- if (dw && priv->negativeW != WS_NOZMAP
- && priv->positiveW != WS_NOZMAP) {
+ if (dw && priv->negativeW != WS_NOMAP
+ && priv->positiveW != WS_NOMAP) {
buttons &= ~(priv->negativeW | priv->positiveW);
if (dw < 0) {
DBG(4, ErrorF("W -> button %d\n",
diff --git a/driver/xf86-input-ws/src/ws.h b/driver/xf86-input-ws/src/ws.h
index 05a506299..6aaee9061 100644
--- a/driver/xf86-input-ws/src/ws.h
+++ b/driver/xf86-input-ws/src/ws.h
@@ -26,10 +26,12 @@ extern int ws_debug_level;
# define DBG(lvl, f)
#endif
-#define NAXES 2 /* X and Y axes only */
-#define NBUTTONS 32 /* max theoretical buttons */
-#define DFLTBUTTONS 3 /* default number of buttons */
-#define NUMEVENTS 16 /* max # of ws events to read at once */
+#define NAXES 2 /* X and Y axes only */
+#define NBUTTONS 32 /* max theoretical buttons */
+#define DFLTBUTTONS 3 /* default number of buttons */
+#define NUMEVENTS 16 /* max # of ws events to read at once */
+
+#define WS_NOMAP 0
typedef struct WSDevice {
char *devName; /* device name */