From: Peter Hutterer Date: Sat, 11 Apr 2020 03:29:38 +0000 (+1000) Subject: tools: per-slot-delta: init the slots with the right index X-Git-Tag: 1.15.901~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=61296feaeed786ed0ccb7023c69b53104ce92844;p=platform%2Fupstream%2Flibinput.git tools: per-slot-delta: init the slots with the right index The index is unused, but useful during debugging Signed-off-by: Peter Hutterer --- diff --git a/tools/libinput-analyze-per-slot-delta.py b/tools/libinput-analyze-per-slot-delta.py index b60c131..3363ea7 100755 --- a/tools/libinput-analyze-per-slot-delta.py +++ b/tools/libinput-analyze-per-slot-delta.py @@ -81,7 +81,6 @@ class SlotState: class Slot: - index = 0 state = SlotState.NONE x = 0 y = 0 @@ -90,6 +89,9 @@ class Slot: used = False dirty = False + def __init__(self, index): + self.index = index + class InputEvent: def __init__(self, data): @@ -130,7 +132,7 @@ def main(argv): if args.use_st: nslots = 1 - slots = [Slot() for _ in range(0, nslots)] + slots = [Slot(i) for i in range(0, nslots)] marker_begin_slot = " ++++++ | " # noqa marker_end_slot = " ------ | " # noqa