diff options
| author | Igor Soarez <igor@soarez.org> | 2026-10-27 12:15:03 +0200 |
|---|---|---|
| committer | Igor Soarez <igor@soarez.org> | 2026-10-27 12:15:03 +0200 |
| commit | a2378a3ed12e62ea34ad9475084ecb5a387386a5 (patch) | |
| tree | a1feec9c2868a4450eb277b5fab3113656cad50e /menubar/main.swift | |
| parent | 53e86be78d7a80a114cf265dbf8189606297d040 (diff) | |
panel: a click that moves a point or two is still a click
any pointer movement between press and release started a panel drag and
swallowed the click, so clicking a row often did nothing and had to be
repeated: in a logged session, 12 of 17 clicks were taken as drags. the
5 that counted waited at most 4 ms and ran `dingger focus` in 60-120 ms.
a drag now needs more than 4 points of movement (isDrag, selftest).
Diffstat (limited to 'menubar/main.swift')
| -rw-r--r-- | menubar/main.swift | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/menubar/main.swift b/menubar/main.swift index c37386e..1b6ce4f 100644 --- a/menubar/main.swift +++ b/menubar/main.swift @@ -408,6 +408,8 @@ if arguments.contains("--selftest") { if importanceListed != importanceExpected { failures.append("order: status first, then importance, then time: \(importanceListed)") } + if isDrag(from: .zero, to: NSPoint(x: 2, y: 3)) { failures.append("click: a few points of jitter is a click") } + if !isDrag(from: .zero, to: NSPoint(x: 0, y: 5)) { failures.append("click: moving 5 points is a drag") } let high = Row(paneId: "%1", agent: "pi", name: "Fix it", status: .done, session: "s", window: "w", since: 1, importance: .high) if rowTitle(high).string != "✓ ! Fix it" || rowTitlePrefix(high) != "✓ ! " { failures.append("title: a high agent is marked: \(rowTitle(high).string)") |
