Skip to content

popout: fix hover popouts closing in the gap to the bar - #4258

Merged
bbedward merged 2 commits into
duxlabs-dev:masterfrom
Conava:hover-popout-gap
Nov 12, 2026
Merged

bbedward merged 2 commits into
duxlabs-dev:masterfrom
Conava:hover-popout-gap

Conversation

@Conava

@Conava Conava commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Description

With hover popouts on and connected popouts off, the popout closed as soon as the mouse entered the gap between the bar and the popout, so it couldn't be reached. Connected popouts touch the bar, which is why they weren't affected.

This restores the area in between the bar and the separated popout to be considerd part of the popout so moving into the popout no longer counts as leaving it. Leaving the popout still closes it like before.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Screenshots / video

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dux-docs to document any new behaviors: https://github.com/duxlabs-dev/dux-docs

With connected popouts off, a hover popout closed as soon as the
pointer crossed the gap between the bar and the popout.

The popout window now takes input over the whole area around it, so
its hover-dismiss tracker is already hovered in the gap. The body's
hover areas sit above that tracker, so entering the body reads as the
pointer leaving, and the tracker dismisses unless the cursor is still
within reach of the bar. A connected popout touches the bar, which is
why only the standalone one closed.

Moving onto the body is not leaving the popout, so the tracker no
longer dismisses while the body is hovered. Leaving the body still
closes the popout through the existing grace timer.
@github-actions github-actions Bot added fix ui Quickshell UI under quickshell/ labels Nov 12, 2026
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

The one-line fix only works if Qt clears hover in a particular order, so the gap bug can still happen in some sessions.

  • The immediate dismiss is skipped only when the body tracker gets its leave after the outer tracker. Qt sends both leaves in hash order on window leave. quickshell/Widgets/PopoutHoverDismiss.qml:85

Checked: the PopoutHoverDismiss change and how it interacts with HoverDismissTracker, PopoutHoverBodyTracker, the DPopoutHost input mask, PopoutManager.cursorOverBar and DBarHoverController cursor updates. Model: claude-opus-5-5.

enabled: root.dismissEnabled && !root.dismissSuspended && root.surfaceVisible
shouldDismiss: function () {
return !PopoutManager.cursorOverBar(PopoutManager.hoverCursorGlobalX, PopoutManager.hoverCursorGlobalY);
return !root.bodyHovered && !PopoutManager.cursorOverBar(PopoutManager.hoverCursorGlobalX, PopoutManager.hoverCursorGlobalY);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only works if bodyHovered is still true when this handler gets its leave. With inputMargin 0, the input mask is just contentContainer, so when the pointer leaves the popout surface, the body tracker and this tracker are both cleared by the same window leave. Qt delivers that leave in QHash order over hoverItems, and the hash seed changes per process. When the body tracker goes first, bodyHovered is already false, so we still dismiss immediately and the gap bug comes back in some sessions. When inputMargin > 0, the body leaves first, so this change never helps.

Fix that doesn't depend on order: don't dismiss immediately on the outer leave. Restart graceTimer from this tracker's onHoveredChanged when !hovered && enabled, and drop shouldDismiss/onDismissRequested. The timer already checks bodyHovered and cursorOverBar.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dammit the clanker was smarter than me. Will change this

Leaving the popout's outer hover area now restarts the existing grace
timer instead of dismissing at once. The timer already skips closing
while the body is hovered or the cursor is near the bar, so the result
no longer depends on which hover handler hears about the move first.
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found. The earlier ordering problem is fixed: the outer leave now restarts the grace timer instead of dismissing right away, and the timer checks bodyHovered and cursorOverBar itself.

Checked: PopoutHoverDismiss with HoverDismissTracker (an unhandled dismissRequested is harmless once shouldDismiss is unset), the enabled guard on leave, the DPopoutHost wiring, and that DSlideout still uses its own tracker unchanged. No new timers or connections. Model: claude-opus-5-5.

@bbedward
bbedward merged commit 80f116b into duxlabs-dev:master Nov 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants