Skip to content

Keep fullscreen windows from taking the keyboard back - #13688

Open
shawnyeager wants to merge 3 commits into
omacom:quattrofrom
shawnyeager:fix/fullscreen-overlay-focus
Open

shawnyeager wants to merge 3 commits into
omacom:quattrofrom
shawnyeager:fix/fullscreen-overlay-focus

Conversation

@shawnyeager

@shawnyeager shawnyeager commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem

A fullscreen client asks for focus the moment the menu or an OSD takes the keyboard, and Omarchy grants that request. The same client inhibits shortcuts, so the volume and brightness keys never arrive.

Fix

One window rule in default/hypr/windows.lua. While a window is fullscreen it does not receive focus just because it asks, and it cannot inhibit shortcuts.

Testing

The rule uses the same focus_on_activate property already set for Telegram, plus no_shortcuts_inhibit. I did not open overlays on the running session.

A fullscreen window that re-activates, or that inhibits shortcuts, takes
the keyboard back the moment the menu or an OSD opens, and the overlay
closes. Fullscreen windows no longer take focus on activate, and the
launcher, volume, and brightness keys are not inhibited.
A fullscreen client re-activates when an overlay opens, and it inhibits
the keys that open the menu and the volume and brightness OSDs.
@shawnyeager shawnyeager changed the title Keep fullscreen clients from dismissing shell overlays Keep fullscreen windows from taking the keyboard back Sep 28, 2026
@omarchybot omarchybot added the bug Something isn't working label Oct 3, 2026
@jandrusk

jandrusk commented Oct 7, 2026

Copy link
Copy Markdown

Thanks for this. A few things before it can go in:

  1. Needs a rebase. It conflicts with quattro now: default/hypr/windows.lua changed around the require("default.hypr.apps") line.
  2. no_shortcuts_inhibit on every fullscreen window is too broad. Shortcut inhibit is what lets fullscreen VMs, Moonlight/remote desktop, and some games receive Super chords. With this rule, any fullscreen client of that kind loses them to Hyprland. Can this be limited to the case you hit (which app was it?), or handled on the overlay side so the menu/OSD keeps focus without turning off inhibit for every fullscreen window?
  3. Related work: Keep keyboard focus on fullscreen Proton games #13624 goes the other way for fullscreen Proton games (it keeps focus on the fullscreen window), and Hold notification toasts back behind a fullscreen window #13850 / Find the bar's monitor through the live monitor list #14162 touch fullscreen + overlay interaction. Worth checking these don't fight each other.
  4. The description says the overlays weren't actually opened on a running session. A short note on what you tested (which app, volume/brightness keys before and after) would help a lot.

@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 9fc140a. As pushed, this conflicts with quattro in default/hypr/windows.lua, where the comment above require("default.hypr.apps") has changed. So the rule was tested on a local merge with current quattro, on a disposable Omarchy VM (Hyprland 0.56.2). The test used a small Wayland client that goes fullscreen, holds a keyboard-shortcuts inhibitor and logs every key it receives, with keys sent from a uinput keyboard so Hyprland treats them as real input.

What it showed:

  • The volume problem is real. On quattro, while a fullscreen client holding a shortcut inhibitor has focus, the volume key goes to the client and the volume does not change. This rule fixes that.
  • The focus problem did not reproduce. When the Omarchy menu opened, it kept the keyboard even though the client asked for activation the moment it lost focus. The client got the keyboard back only after Escape closed the menu, and the volume key worked while the menu was open. The OSD never takes the keyboard at all: shell/plugins/osd/Osd.qml:129 sets WlrKeyboardFocus.None. So nothing was found for focus_on_activate = false to fix. If you hit it with a particular app, naming it would let that part be reproduced.
  • no_shortcuts_inhibit on every fullscreen window breaks keyboard capture. With the rule, Super+J no longer reached the fullscreen client: Hyprland ran its own binding instead, while still telling the client its inhibitor was active. VM viewers, remote desktop clients and Moonlight rely on that capture to pass Super chords through, and Omarchy forces Moonlight fullscreen (default/hypr/apps/moonlight.lua:1).

The smaller fix is on the binding side. Hyprland's dont_inhibit bind option lets a single binding through an inhibitor. With dont_inhibit = true added to the volume-up binding in default/hypr/bindings/media.lua, the volume key worked while the client had focus, and Super+J still reached the client. Adding it to the volume, mute and brightness bindings in that file (lines 2–9 and 18–21) would cover what this PR describes without a window rule.

./test/cli and the Hyprland and window shell tests pass with the rule applied. As a second opinion, Codex Medium reviewed the change and these results. It agreed with all three conclusions, though its independence is not guaranteed. It also pointed out the OSD's keyboard setting, which was then checked in the source. This matches points 1, 2 and 4 of the review above.

Nothing has been pushed to your branch, because the change suggested here replaces the approach rather than fixing a line of it. Waiting on you: a rebase onto quattro, and either the narrower binding change or the name of the app that took focus back.

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.

3 participants