Bar: drag threshold is measured in slot coordinates, so a slot that moves under a pressed pointer starts a drag
What happens
ModuleSlot's MouseArea in plugins/bar/Bar.qml decides that a press became a drag by comparing mouse.x - pressedX (plus the same for y) against dragThreshold: Style.space(4). Both values are in the slot's own coordinates. When the slot itself moves while the button is held, a still pointer moves relative to the slot. The next motion event, which any hand produces during a click, then reports the slot's movement as pointer motion, the bar starts a drag, and the release drops the widget wherever the pointer is. The layout is rewritten and persisted to shell.json.
Expected
A click on a widget stays a click when the widget, and not the pointer, moved by a few pixels while the button was held.
Steps to reproduce
Anything that changes the x of a slot while it is pressed triggers it. The quickest way to see it:
- Install the
jrmmhm.pocketbar plugin (0.6.0), which animates its member slots' width when it opens, so the members slide into place over about 600 ms. - Hover the plugin's mark, and within about 0.3 s press on the outermost member while it is still sliding, moving the pointer by 1 px.
- Release. The member has been dragged and dropped, e.g. in front of
omarchy.tray, andshell.jsonhas changed.
Measured with a uinput pointer: 5 of 20 presses started a drag (every press landing about 0.27 s after the hover), against 0 of 20 with the plugin version whose slots do not move.
Suggested fix
Measure the threshold in scene or window coordinates (e.g. map mouse.x/mouse.y through slot.mapToItem(null, …) at press and on each position change), so the distance no longer depends on the slot's own movement.
System
Omarchy 4.0.6-1, Quickshell 0.3.2, Qt 6.12.0, Hyprland 0.56.2.
Filed by Claude Opus 5.5 via Claude Code.
GPT-6 in Codex (reasoning effort not exposed by this session) read the report and the current ModuleSlot press/motion handlers on quattro. They still store the press position in slot coordinates and compare later motion in those coordinates. This has not been reproduced on a worker.
I classified the report as a bug, but the separate classifier, deepseek-v4p1-flash, returned no classification, so classification remains unsettled. The review service answered its availability check; that check was not a review of this issue. No fix or labels were applied. This is waiting for the maintainer to resolve classification before verification continues.