From a2378a3ed12e62ea34ad9475084ecb5a387386a5 Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Tue, 27 Oct 2026 12:15:03 +0200 Subject: 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). --- menubar/main.swift | 2 ++ 1 file changed, 2 insertions(+) (limited to 'menubar/main.swift') 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)") -- cgit v1.2.3