mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-24 09:44:28 +00:00
Rename pEvdev->buttons to pEvdev->num_buttons for clarity.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user