Skip to content

Fix bar hand cursor never appearing until the slot's first click - #9050

Open
JeronimoColon wants to merge 3 commits into
omacom:quattrofrom
JeronimoColon:fix/bar-cursor-first-hover
Open

JeronimoColon wants to merge 3 commits into
omacom:quattrofrom
JeronimoColon:fix/bar-cursor-first-hover

Conversation

@JeronimoColon

Copy link
Copy Markdown

Fixes #9047.

Problem

modulePointer's cursorShape binding reads mouseX/mouseY, but the MouseArea has no hoverEnabled — 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:

  • No pointing-hand cursor on hover until each slot's first click of a session.
  • After a click, the hand sticks — including over the slot's non-clickable padding.
  • A transient (0,0) hit during startup (slots still overlapping before the positioner runs) latches hasCursor on, so the slot's stale Arrow permanently shadows any cursor widgets beneath set themselves.

Fix

Feed the binding from the slot's existing moduleHover HoverHandler — 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: true on modulePointer was considered and rejected: it blocks hover from reaching widget-internal MouseAreas, breaking tooltips (WidgetButton onEntered → bar.showTooltip), containsMouse styling, 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 hasCursor latch, the click-"fix", the tooltip breakage under naive hoverEnabled, and correct behavior with this change (hand on first hover, arrow over padding, hover still reaching inner MouseAreas, click/drag unaffected — onPositionChanged already guards on mouse.buttons). Full analysis in #9047.

./test/all: the two failures in my environment (bar icons share slot and baseline geometry off-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

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.
@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Sep 27, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

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 moduleClickTargetAt falls back to slot.activeItem when the module is itself clickable, so the old (0,0) lookup still returned a target for those slots. That doesn't affect the fix, but the issue and the description claim more than I could see on a stock install.

Tests: ./test/cli passed on the worker. Of the bar shell tests, bar-icon-geometry, bar-widget-contract and bar-text-color passed. bar-test.sh failed only on node missing on the worker, and it fails the same way on the base, so its Node checks did not run here. The change is one binding and proportionate to the problem. It is still quattro's current code, and it merges cleanly.

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.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 4, 2026
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>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 7, 2026
@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Updates Bar.qml so the hand cursor follows the slot’s hover position before its first click.

  • Uses moduleHover.point.position instead of click-dependent coordinates.
  • Releases the cursor override outside click targets.
  • No actionable issues found.

Reviews (2) · Last reviewed commit: "Merge quattro into fix/bar-cursor-first-..." · Reviewed by Greptile

@omarchybot omarchybot added the ready Good to merge label Oct 7, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This stopped merging after #11015 landed on quattro, which changed the same cursorShape line to run the hit test only while moduleHover.hovered. That guard still hit-tests at the MouseArea's press-only mouseX/mouseY, so it doesn't fix this bug. I pushed a merge of quattro into the branch (32f8366) that keeps both: the hover guard from #11015 and your live moduleHover.point.position coordinates with the undefined reset. The rest of your change is untouched.

Reproduced on a worker (Hyprland 0.56.2, stock install), with the shell loaded from each tree. On quattro (982290f), the pointing hand shows over the empty padding just right of the last workspace number (x=140) on first hover. On the merged head, that spot shows an arrow, and the hand still shows over the workspace buttons and the clock. I linked the head again after the base and got the same result. Because the head minus this one binding is exactly quattro, the binding is what makes the difference.

Tests: ./test/cli passed on the worker. bar-icon-geometry, bar-widget-contract and bar-text-color passed. bar-test.sh failed only because node is missing on the worker, and it fails the same way on quattro. Greptile's check on the new head passed.

Second opinion: Codex Medium reviewed the merged head and found nothing wrong. It confirmed that undefined resets cursorShape rather than warning, and that moduleHover.point.position is in the slot's coordinates, which is what moduleClickTargetAt expects. It could read this review's working files, so its agreement isn't fully independent. My review was by Claude Opus 5.5.

The change is one binding and proportionate to the problem. It now waits on the maintainer.

@omarchybot omarchybot removed ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review labels Oct 15, 2026
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>
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 15, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This stopped merging again after #15517 reworked bar dragging and rewrote the comment next to this binding. I pushed a merge of quattro into the branch (5377e66). It keeps your moduleHover.point.position binding and the undefined reset, plus quattro's new comment beside it. With the merge, the pull request still changes only that one binding against quattro.

Reproduced on a worker (stock install from the Omarchy ISO, 1280x800), with the shell loaded from each tree. On quattro (c5ccef6), the pointing hand shows over the empty padding just right of the last workspace number (x=140) on first hover. On the merged head, that spot shows an arrow, and the hand still shows over the workspace buttons, the clock and the tray. The head minus this binding is exactly quattro, so the binding is what makes the difference.

Tests: ./test/cli passed on the worker, and so did bar-drag, bar-icon-geometry, bar-widget-contract and bar-text-color. bar-test.sh and bar-click-clipping-test.sh failed only because node is missing on the worker. They fail the same way on quattro, so their Node checks did not run here. Greptile's check passed on the new head.

Second opinion: Codex Medium reviewed the merge against #15517's changes and found nothing wrong. It checked that modulePointer and moduleHover are both still direct children of the slot, so the hover position is in the coordinates moduleClickTargetAt expects. It also checked that the tray drawer and dragging are unaffected, and that the merge dropped nothing from either side. It could read this review's working files, so its agreement isn't fully independent. My review was by Claude Opus 5.5.

#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bar: pointing-hand cursor never appears until the slot's first click (stale mouseX/mouseY in modulePointer cursorShape binding)

2 participants