Skip to content

Close the menu on Escape release so the key-up doesn't leak to the window underneath - #19817

Open
SirJul1337 wants to merge 1 commit into
omacom:quattrofrom
SirJul1337:fix/issue-18911-esc-release
Open

SirJul1337 wants to merge 1 commit into
omacom:quattrofrom
SirJul1337:fix/issue-18911-esc-release

Conversation

@SirJul1337

Copy link
Copy Markdown

Fixes #18911

What changes

Pressing Esc to close the Omarchy menu over a fullscreen video also took the browser out of fullscreen. The menu closed on the key press, so its layer surface unmapped while Esc was still down, keyboard focus went back to the browser, and the browser got the release — Chromium and Firefox leave fullscreen on that key-up.

The menu now closes on the Escape release instead. The press arms the close (or clears the filter, as before); the release on the menu's own surface carries it out, so the key-up never reaches the window underneath. Any other key pressed in between disarms it, auto-repeat is ignored, and the flag resets whenever the menu opens or closes.

Scoped to the menu, which is where this was reported. Other overlays that close on an Escape press (clipboard, emojis, image picker, app grid, PanelKeyCatcher panels) have the same pattern and could follow the same way if this is the direction you want.

Verification

In a QEMU VM on Omarchy 4.5.0-3 (Hyprland 0.56.2), with a Chromium page that logs keyup and fullscreenchange events, fullscreened with f. Keys sent as real press/release via QMP.

  • Stock menu: SUPER+SPACE, then Esc → menu closes and the page logs fullscreenchange, Chromium leaves fullscreen (hyprctl clients fullscreen 2 → 0).
  • With this change: same steps → menu closes, no event reaches the page, Chromium stays fullscreen.
  • Typing ter, then Esc clears the filter and keeps the menu open; a second Esc closes it.

Not checked: holding Esc for a long time (should now close on release instead of on the first repeat).

Screenshots

No visible change: the menu looks the same; only when it closes (key release instead of press) differs.

@greptile-apps

greptile-apps Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; no actionable failures were found.RetriggerView in GreptileConfidence Score: 5/5

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

Summary

The menu now waits for Escape release before closing, so it keeps keyboard focus until the key is up.

  • The menu closes on Escape release when its filter is empty.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Escape press] --> B{Auto-repeat?}
  B -->|Yes| C[Ignore]
  B -->|No| D{Filter has text?}
  D -->|Yes| E[Clear filter]
  D -->|No| F[Arm close]
  F --> G{Next event}
  G -->|Other key press| H[Disarm close]
  G -->|Real Escape release| I[Close menu]
Loading

Reviews (2) · Last reviewed commit: "Close the menu on Escape release so the ..." · Reviewed by Greptile

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Nov 22, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reproduced #18911 on a disposable Omarchy worker with Chromium: opening the menu with Super+Space and pressing Escape exits browser fullscreen on quattro. At ab835503aa7337c2a141fe8828599d65510ec366, the menu closes while Chromium stays fullscreen. Reverting only Menu.qml brings the failure back.

Held Escape, clearing a filter before closing, an intervening navigation key, uninstall-confirmation cancellation, and select/input cancellation behaved as intended. The CLI and focused menu, guard, budget, and filter-input suites passed on the worker. The first three Node-based tests needed the worker's already installed Node added to the SSH PATH before they could run.

GPT-6 High in Codex reviewed the change. Opus 5.5 High and muse-wonder via pi, thinking high also found no blocking defects and accepted the reproduction; agreement does not guarantee independence. No branch changes or new automated regression test were added: the fullscreen leak was checked through the real compositor and browser. The ready label was withheld because GitHub’s Tests and Check translation structure workflows are waiting for approval. A maintainer needs to approve those runs before CI can complete.

Before: the base menu closes and Chromium leaves fullscreen. After: the same keys close the menu and preserve fullscreen. These captures show a local browser fullscreen probe rather than video playback.

Before: dismissing the menu also exits Chromium fullscreen

After: dismissing the menu preserves Chromium fullscreen

@omarchybot omarchybot mentioned this pull request Nov 23, 2026
@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

esc key bug

2 participants