summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/evdev.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 639e4a1..360bbb8 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2759,22 +2759,22 @@ static void EvdevInitButtonLabels(EvdevPtr pEvdev, int natoms, Atom *atoms)
for (button = BTN_MISC; button < BTN_JOYSTICK; button++)
{
- if (libevdev_has_event_code(pEvdev->dev, EV_KEY, button))
- {
- int group = (button % 0x100)/16;
- int idx = button - ((button/16) * 16);
+ int group = (button % 0x100)/16;
+ int idx = button - ((button/16) * 16);
+
+ if (!libevdev_has_event_code(pEvdev->dev, EV_KEY, button))
+ continue;
- if (!btn_labels[group][idx])
- continue;
+ if (!btn_labels[group][idx])
+ continue;
- atom = XIGetKnownProperty(btn_labels[group][idx]);
- if (!atom)
- continue;
+ atom = XIGetKnownProperty(btn_labels[group][idx]);
+ if (!atom)
+ continue;
- /* Props are 0-indexed, button numbers start with 1 */
- bmap = EvdevUtilButtonEventToButtonNumber(pEvdev, button) - 1;
- atoms[bmap] = atom;
- }
+ /* Props are 0-indexed, button numbers start with 1 */
+ bmap = EvdevUtilButtonEventToButtonNumber(pEvdev, button) - 1;
+ atoms[bmap] = atom;
}
/* wheel buttons, hardcoded anyway */