Skip to content

Commit

Permalink
trailfocus.py: Ignore 0 timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
soreau committed Nov 26, 2023
1 parent 324104a commit c82d12c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ipc-scripts/trailfocus.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ def sort_views():
continue
if "parent" in v and v["state"]["minimized"]:
continue
if v["last-focus-timestamp"] <= 0:
continue
timestamps.append(v["last-focus-timestamp"])
i += 1
if i == 0:
continue
timestamps.sort()
o_step = 0.2 / i
b_step = 0.5 / i
Expand Down

0 comments on commit c82d12c

Please sign in to comment.