diff options
-rw-r--r-- | src/evdev.c | 12 | ||||
-rw-r--r-- | src/evdev.h | 1 | ||||
-rw-r--r-- | src/evdev_axes.c | 8 | ||||
-rw-r--r-- | src/evdev_key.c | 26 |
4 files changed, 7 insertions, 40 deletions
diff --git a/src/evdev.c b/src/evdev.c index 881f079..868bbff 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -367,9 +367,7 @@ EvdevSwitchMode (ClientPtr client, DeviceIntPtr device, int mode) case Absolute: case Relative: xf86Msg(X_INFO, "%s: Switching mode to %d.\n", pInfo->name, mode); - if (state->abs) - state->mode = mode; - else + if (!state->abs) return !Success; break; default: @@ -379,11 +377,6 @@ EvdevSwitchMode (ClientPtr client, DeviceIntPtr device, int mode) return Success; } -/* -static Bool -EvdevNew(evdevDriverPtr driver, evdevDevicePtr device) -*/ - InputInfoPtr EvdevPreInit(InputDriverPtr drv, IDevPtr dev, int flags) { @@ -407,9 +400,6 @@ EvdevPreInit(InputDriverPtr drv, IDevPtr dev, int flags) pInfo->device_control = EvdevProc; pInfo->read_input = EvdevReadInput; pInfo->switch_mode = EvdevSwitchMode; -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 - pInfo->motion_history_proc = xf86GetMotionEvents; -#endif pInfo->conf_idev = dev; pInfo->private = pEvdev; diff --git a/src/evdev.h b/src/evdev.h index d14bba3..9d84843 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -181,7 +181,6 @@ typedef struct { typedef struct _evdevState { Bool can_grab; Bool sync; - int mode; /* Either Absolute or Relative. */ evdevBtnPtr btn; evdevAbsPtr abs; diff --git a/src/evdev_axes.c b/src/evdev_axes.c index 4abab46..60bfde7 100644 --- a/src/evdev_axes.c +++ b/src/evdev_axes.c @@ -581,7 +581,7 @@ EvdevAxesAbsProcess (InputInfoPtr pInfo, struct input_event *ev) if (v_flags & EV_ABS_V_M_REL) is_rel = 1; - else if ((v_flags & EV_ABS_V_M_AUTO) && state->mode == Relative) + else if ((v_flags & EV_ABS_V_M_AUTO) && pInfo->dev->valuator->mode == Relative) is_rel = 1; else is_rel = 0; @@ -728,13 +728,13 @@ EvdevAxisAbsNew1(InputInfoPtr pInfo) s = xf86SetStrOption(pInfo->options, "Mode", "Absolute"); if (!strcasecmp(s, "Absolute")) { - state->mode = Absolute; + pInfo->dev->valuator->mode = Absolute; xf86Msg(X_CONFIG, "%s: Configuring in %s mode.\n", pInfo->name, s); } else if (!strcasecmp(s, "Relative")) { - state->mode = Relative; + pInfo->dev->valuator->mode = Relative; xf86Msg(X_CONFIG, "%s: Configuring in %s mode.\n", pInfo->name, s); } else { - state->mode = Absolute; + pInfo->dev->valuator->mode = Absolute; xf86Msg(X_CONFIG, "%s: Unknown Mode: %s.\n", pInfo->name, s); } diff --git a/src/evdev_key.c b/src/evdev_key.c index b0864a3..d278988 100644 --- a/src/evdev_key.c +++ b/src/evdev_key.c @@ -331,22 +331,6 @@ static KeySym map[] = { /* 0xf7 */ NoSymbol, NoSymbol, }; -/* - * FIXME: We have no way of ringing the bell ourselves. - * - * And recent versions of X don't have the system call. - * Who cares. - */ -static void -EvdevKbdBell (int percent, DeviceIntPtr device, pointer arg, int unused) -{ -#if 0 - KeybdCtrl *ctrl = arg; - - xf86OSRingBell(percent, ctrl->bell_pitch, ctrl->bell_duration); -#endif -} - static void EvdevKbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl) { @@ -440,7 +424,7 @@ EvdevKeyInit (DeviceIntPtr device) state->key->xkb_options); XkbInitKeyboardDeviceStruct (device, &state->key->xkbnames, &keySyms, modMap, - EvdevKbdBell, EvdevKbdCtrl); + NULL, EvdevKbdCtrl); return Success; } @@ -467,17 +451,11 @@ EvdevKeyNew (InputInfoPtr pInfo) evdevStatePtr state = &pEvdev->state; int i, keys = 0; - for (i = 0; i <= KEY_UNKNOWN; i++) + for (i = 0; i <= 0xF7; i++) if (test_bit (i, pEvdev->bits.key)) { keys = 1; break; } - if (!keys) - for (i = KEY_OK; i <= KEY_MAX; i++) - if (test_bit (i, pEvdev->bits.key)) { - keys = 1; - break; - } if (!keys) return !Success; |