Skip to content

widgets: fix context menu actions needing two clicks on hyprland - #4429

Open
Conava wants to merge 1 commit into
duxlabs-dev:masterfrom
Conava:launcher-context-menu-focus
Open

Conava wants to merge 1 commit into
duxlabs-dev:masterfrom
Conava:launcher-context-menu-focus

Conversation

@Conava

@Conava Conava commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Description

Fix right-click menus that need two clicks to run an action on Hyprland, for example in the launcher. The first click on a menu item went to the launcher behind it, so nothing happened until the second click.

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

DContextMenu registered its window with the transient surface tracker
from onRenderActiveChanged, which runs before the contextWindow binding
updates. The tracker got null, so the menu surface never joined the
host's Hyprland focus grab: the first click went to the surface below
and only cleared the grab. Register again once contextWindow changes.
@github-actions github-actions Bot added fix ui Quickshell UI under quickshell/ labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

Looks good: re-registering the menu's window with the tracker when contextWindow resolves after renderActive correctly adds the popup to the Hyprland focus grab peers.

No issues found.

Checked: DContextMenu.qml handler ordering (popup loader item / surface host resolving after renderActive), TransientSurfaceTracker.setActive idempotence on open and close, focusWindows feeding DModal peerWindows, AGENTS.md handler rules. Model: claude-opus-5-5.

This branch has not been deployed

No deployments
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.

1 participant