summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-04-14 15:34:43 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-04-18 08:40:41 +1000
commitef4e96de589114b6dde9b9c310ad3a290f7d6429 (patch)
treea7a6ac3a425807f06ba9a7ee338c5f4b47432d0c /src
parentdf879a6c4f2c8dbe814a70c36c762f16d1835fa8 (diff)
evdev: rename slot to slot_idx
No functional changes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/evdev.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/evdev.c b/src/evdev.c
index e44dfd18..d9d23025 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -346,7 +346,7 @@ static void
evdev_flush_pending_event(struct evdev_device *device, uint64_t time)
{
struct libinput *libinput = device->base.seat->libinput;
- int slot;
+ int slot_idx;
int seat_slot;
struct libinput_device *base = &device->base;
struct libinput_seat *seat = base->seat;
@@ -354,7 +354,7 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time)
struct device_coords point;
struct device_float_coords raw;
- slot = device->mt.slot;
+ slot_idx = device->mt.slot;
switch (device->pending_event) {
case EVDEV_NONE:
@@ -395,7 +395,7 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time)
if (!(device->seat_caps & EVDEV_DEVICE_TOUCH))
break;
- if (device->mt.slots[slot].seat_slot != -1) {
+ if (device->mt.slots[slot_idx].seat_slot != -1) {
log_bug_kernel(libinput,
"%s: Driver sent multiple touch down for the "
"same slot",
@@ -404,45 +404,45 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time)
}
seat_slot = ffs(~seat->slot_map) - 1;
- device->mt.slots[slot].seat_slot = seat_slot;
+ device->mt.slots[slot_idx].seat_slot = seat_slot;
if (seat_slot == -1)
break;
seat->slot_map |= 1 << seat_slot;
- point = device->mt.slots[slot].point;
+ point = device->mt.slots[slot_idx].point;
evdev_transform_absolute(device, &point);
- touch_notify_touch_down(base, time, slot, seat_slot,
+ touch_notify_touch_down(base, time, slot_idx, seat_slot,
&point);
break;
case EVDEV_ABSOLUTE_MT_MOTION:
if (!(device->seat_caps & EVDEV_DEVICE_TOUCH))
break;
- seat_slot = device->mt.slots[slot].seat_slot;
- point = device->mt.slots[slot].point;
+ seat_slot = device->mt.slots[slot_idx].seat_slot;
+ point = device->mt.slots[slot_idx].point;
if (seat_slot == -1)
break;
evdev_transform_absolute(device, &point);
- touch_notify_touch_motion(base, time, slot, seat_slot,
+ touch_notify_touch_motion(base, time, slot_idx, seat_slot,
&point);
break;
case EVDEV_ABSOLUTE_MT_UP:
if (!(device->seat_caps & EVDEV_DEVICE_TOUCH))
break;
- seat_slot = device->mt.slots[slot].seat_slot;
- device->mt.slots[slot].seat_slot = -1;
+ seat_slot = device->mt.slots[slot_idx].seat_slot;
+ device->mt.slots[slot_idx].seat_slot = -1;
if (seat_slot == -1)
break;
seat->slot_map &= ~(1 << seat_slot);
- touch_notify_touch_up(base, time, slot, seat_slot);
+ touch_notify_touch_up(base, time, slot_idx, seat_slot);
break;
case EVDEV_ABSOLUTE_TOUCH_DOWN:
if (!(device->seat_caps & EVDEV_DEVICE_TOUCH))