diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-05-21 09:51:57 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-05-21 15:51:08 +1000 |
commit | aa117d49a5139bcc453e6ab022b67347464a8acd (patch) | |
tree | baa8c11d7d46198540556767ead39c612d00110c | |
parent | b358f1eb3a4ef8fdee099114d6c70d6ea06eba95 (diff) |
Rename pEvdev->buttons to pEvdev->num_buttons for clarity.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/emuWheel.c | 8 | ||||
-rw-r--r-- | src/evdev.c | 8 | ||||
-rw-r--r-- | src/evdev.h | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/emuWheel.c b/src/emuWheel.c index 7d3eb24..bb3a980 100644 --- a/src/emuWheel.c +++ b/src/emuWheel.c @@ -201,8 +201,8 @@ EvdevWheelEmuHandleButtonMap(InputInfoPtr pInfo, WheelAxisPtr pAxis, char* axis_ pAxis->down_button = down_button; /* Update the number of buttons if needed */ - if (up_button > pEvdev->buttons) pEvdev->buttons = up_button; - if (down_button > pEvdev->buttons) pEvdev->buttons = down_button; + if (up_button > pEvdev->num_buttons) pEvdev->num_buttons = up_button; + if (down_button > pEvdev->num_buttons) pEvdev->num_buttons = down_button; } else { xf86Msg(X_WARNING, "%s: Invalid %s value:\"%s\"\n", @@ -285,8 +285,8 @@ EvdevWheelEmuPreInit(InputInfoPtr pInfo) /* Simpler to check just the largest value in this case */ /* XXX: we should post this to the server */ - if (5 > pEvdev->buttons) - pEvdev->buttons = 5; + if (5 > pEvdev->num_buttons) + pEvdev->num_buttons = 5; /* Display default Configuration */ xf86Msg(X_CONFIG, "%s: YAxisMapping: buttons %d and %d\n", diff --git a/src/evdev.c b/src/evdev.c index 63e70a3..9d3409f 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1501,7 +1501,7 @@ EvdevProbe(InputInfoPtr pInfo) if (num_buttons) { pEvdev->flags |= EVDEV_BUTTON_EVENTS; - pEvdev->buttons = num_buttons; + pEvdev->num_buttons = num_buttons; xf86Msg(X_INFO, "%s: Found %d mouse buttons\n", pInfo->name, num_buttons); } @@ -1530,7 +1530,7 @@ EvdevProbe(InputInfoPtr pInfo) xf86Msg(X_INFO, "%s: Forcing buttons for scroll wheel(s)\n", pInfo->name); num_buttons = (num_buttons < 3) ? 7 : num_buttons + 4; - pEvdev->buttons = num_buttons; + pEvdev->num_buttons = num_buttons; } } @@ -2070,7 +2070,7 @@ EvdevInitProperty(DeviceIntPtr dev) XISetDevicePropertyDeletable(dev, prop_axis_label, FALSE); } /* Button labelling */ - if ((pEvdev->buttons > 0) && (prop_btn_label = XIGetKnownProperty(BTN_LABEL_PROP))) + if ((pEvdev->num_buttons > 0) && (prop_btn_label = XIGetKnownProperty(BTN_LABEL_PROP))) { Atom atom, atoms[EVDEV_MAXBUTTONS]; int button, bmap; @@ -2107,7 +2107,7 @@ EvdevInitProperty(DeviceIntPtr dev) atoms[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); XIChangeDeviceProperty(dev, prop_btn_label, XA_ATOM, 32, - PropModeReplace, pEvdev->buttons, atoms, FALSE); + PropModeReplace, pEvdev->num_buttons, atoms, FALSE); XISetDevicePropertyDeletable(dev, prop_btn_label, FALSE); } #endif /* HAVE_LABELS */ diff --git a/src/evdev.h b/src/evdev.h index 6745a07..5b95369 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -98,7 +98,7 @@ typedef struct { int flags; int tool; - int buttons; /* number of buttons */ + int num_buttons; /* number of buttons */ BOOL swap_axes; BOOL invert_x; BOOL invert_y; |