Repository navigation
Fix bar hand cursor never appearing until the slot's first click - #9050
JeronimoColon wants to merge 3 commits into
Conversation
The modulePointer cursorShape binding read mouseX/mouseY, but without hoverEnabled (deliberately off: enabling it would block hover from the widget-internal MouseAreas below, breaking tooltips and hover styling) those only update while a button is pressed. The binding therefore evaluated at (0,0) until the slot's first click, then froze at the press point: no hand cursor on hover before a click, and a stuck one after. A transient hit during startup, while unpositioned slots still overlap, also latched hasCursor on, so the slot's stale Arrow shadowed any cursor the widgets beneath set themselves. Feed the binding from the slot's existing moduleHover HoverHandler instead, which tracks hover without stealing it from items below, and reset the cursor claim (undefined) when not over a click target so widget-set cursors underneath show through.
|
Ran this on an Omarchy worker (Hyprland 0.56.2, stock install) at ed30b3d, against its base 158e8cf. I moved the pointer onto each bar widget from the desktop and captured the cursor, before and after a real left click on a workspace button. What reproduced: on the base, the pointing hand shows over the empty padding at the right end of the workspaces slot, just past the last workspace number, from the very first hover. With this change that spot is an arrow, and the hand still shows over every workspace button, the clock, weather, tray, audio and the other widgets. Since the base is exactly this head with the one line reverted, the line is what makes the difference. What did not reproduce: "no pointing hand until the slot's first click". On the base, every clickable widget I hovered already showed the hand on first hover, before any click. One reason is that Tests: Second opinion: none. The configured reviewer (Codex Medium) was reachable, but it refused this review because its daily quota was spent. So this rests on one model's review (Claude Opus 5.5) plus the worker run, and is not yet ready to merge. Waiting on a second-opinion review, and then the maintainer. |
quattro guarded the same cursorShape binding with moduleHover.hovered so only the hovered slot runs the hit test (omacom#11015). Keep that guard and this branch's live hover coordinates together: the guard alone still hit-tests at the MouseArea's press-only mouseX/mouseY. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryUpdates
Reviews (2) · Last reviewed commit: "Merge quattro into fix/bar-cursor-first-..." · Reviewed by Greptile |
|
This stopped merging after #11015 landed on Reproduced on a worker (Hyprland 0.56.2, stock install), with the shell loaded from each tree. On Tests: Second opinion: Codex Medium reviewed the merged head and found nothing wrong. It confirmed that The change is one binding and proportionate to the problem. It now waits on the maintainer. |
Keeps the live moduleHover coordinates and undefined reset from this branch alongside quattro's rework of bar dragging (omacom#15517), which rewrote the drag.target comment beside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This stopped merging again after #15517 reworked bar dragging and rewrote the comment next to this binding. I pushed a merge of Reproduced on a worker (stock install from the Omarchy ISO, 1280x800), with the shell loaded from each tree. On Tests: Second opinion: Codex Medium reviewed the merge against #15517's changes and found nothing wrong. It checked that #11209 goes the other way: it would show the arrow everywhere on the bar. Which way the bar should go is the maintainer's call. This pull request now waits on the maintainer. |
Fixes #9047.
Problem
modulePointer'scursorShapebinding readsmouseX/mouseY, but the MouseArea has nohoverEnabled— so those coordinates only update while a button is pressed. The binding evaluates at (0,0) until the slot's first click, then freezes at the press point:hasCursoron, so the slot's stale Arrow permanently shadows any cursor widgets beneath set themselves.Fix
Feed the binding from the slot's existing
moduleHoverHoverHandler — it tracks live, slot-local hover coordinates without stealing hover from the widget-internal MouseAreas below — and reset the cursor claim (undefined) when not over a click target, so widget-set cursors underneath show through.hoverEnabled: trueonmodulePointerwas considered and rejected: it blocks hover from reaching widget-internal MouseAreas, breaking tooltips (WidgetButtononEntered → bar.showTooltip),containsMousestyling, and indicator hover-reveal — presumably why it was off in the first place.Verification
Root cause and fix were verified against Qt 6.11.2 / quickshell 0.3.1 / Hyprland 0.56.2 with offscreen QML test harnesses reproducing the stale-coordinate behavior, the startup
hasCursorlatch, the click-"fix", the tooltip breakage under naivehoverEnabled, and correct behavior with this change (hand on first hover, arrow over padding, hover still reaching inner MouseAreas, click/drag unaffected —onPositionChangedalready guards onmouse.buttons). Full analysis in #9047../test/all: the two failures in my environment (bar icons share slot and baseline geometryoff-center by 0.59px, and the omarchy-pkgs checkout probe) are identical on an unmodified checkout — no new failures from this change.🤖 Generated with Claude Code
https://claude.ai/code/session_017xzm1qFSqGkG6wJj7J1EBU