Skip to content

popout: refactor hover popup closing behaviour - #4359

Merged
bbedward merged 2 commits into
duxlabs-dev:masterfrom
Conava:hover-popouts-stuck
Nov 21, 2026
Merged

bbedward merged 2 commits into
duxlabs-dev:masterfrom
Conava:hover-popouts-stuck

Conversation

@Conava

@Conava Conava commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Description

A popout opened by hovering a bar widget could stay open when the pointer left the bar right next to the popout and moved away without touching it. On the other hand, moving from the widget into the popout often brushed over a neighboring widget or the island on the way and switched to that instead.

Now there is a safe zone, the area that widens from the widget down to the popout (top left of the widget to top left of the popout and top right of the widget to top right of the popout roughly): while the pointer moves through it toward the popout or rests on the widget, the popout stays open, and once the pointer leaves it, the popout closes after the usual short delay.
Passing over another widget or the island inside that safezone doesn't open it, but resting on it for a moment still does, and widgets that open the same popout (like the dash tabs) switch right away.

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

A hover-opened popout could stay open for good after the pointer left
the bar sideways, just below the bar next to the popout, and then moved
away. The bar decides once, shortly after the leave, and at that moment
the pointer was still inside the popout's hover margin. The popout's own
grace check only starts on hover changes, and when it ran it read a
pointer position still on the bar. Later moves in the popout's dismiss
zone updated the position but never ran the check again.

Moves outside the popout body now start the grace check, so it runs on
a fresh position. The strip between the bar and the popout body, over
the body's width, counts as on the way into the popout, so moving from
the widget down into the popout keeps it open whatever the popup gap,
bottom gap or spacing.
Replace the strip between bar and popout with one safe zone: the popout
body plus the trapezoid from the trigger widget's span at the screen
edge to the body's bar-facing edge. A hover popout stays open while the
pointer moves through it toward the popout or rests on the widget, and
closes after the usual grace once the pointer leaves it, also when it
slides along the bar past the zone. Resting still on the bar inside the
zone, away from the widget and the popout, closes it after about 300 ms.
The bar's hover chain and the popout's own dismiss check both use this
shape, so they no longer disagree about the bar area.

Inside the zone, passing over another bar widget no longer switches to
its popout; resting on it for about 300 ms still does, and widgets that
share the open popout (dash tabs, the process list) or the same widget
(tray icons) switch right away. On an island bar the island neither
hover-opens nor closes the bar's popout while the pointer crosses it
inside the zone; once the pointer stops on it, it opens after its normal
delay, and an island that was already open stays as it was. Leaving the
island, or the zone, hands the decision back to the bar.

The popout's dismiss check only trusts the zone while its own window
saw the pointer, so a stale position can't keep it open on compositors
where the popout window doesn't cover the gap.
@github-actions github-actions Bot added fix ui Quickshell UI under quickshell/ labels Nov 20, 2026
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
Checked: safe-zone trapezoid math in DPopout.hoverSafeContains for all four bar edges, the dwell/zone-rest timers and pending-hover state in DBarHoverController, the hover-chain switch from containsGlobalPoint to hoverSafeContains, the graceTimer recheck in PopoutHoverDismiss, the IslandController safe-zone hold/release and its bar wiring, timer leaks, idle cost, deprecated shims and tokens. Model: claude-opus-5-5.

@bbedward
bbedward merged commit 0ffe077 into duxlabs-dev:master Nov 21, 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