omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Terminal Opens in Fullscreen When Opened While Another Window is in Fullscreen

Open eds-4d5 opened this issue 3 months ago • 2 comments

System Details

  • Omarchy version: 4.0.1-1
  • Hyprland version: 0.56.2
  • GPU: Intel UHD Graphics (Alder Lake-UP3 GT1)
  • Terminal: foot

Description

When a window is in fullscreen mode (e.g., watching a video in mpv, browser, etc.) and the user opens the terminal (foot), the terminal also opens in fullscreen mode. This behavior is unexpected - the terminal should open in normal windowed mode regardless of the fullscreen state of other windows.

Steps to Reproduce

  1. Open any application (e.g., mpv, browser)
  2. Enable fullscreen mode (e.g., press F in mpv, or browser fullscreen)
  3. While in fullscreen, open the terminal (e.g., Super + Return)
  4. The terminal opens in fullscreen mode instead of normal windowed mode

Expected Behavior

The terminal should always open in normal windowed mode, regardless of the fullscreen state of other windows. Fullscreen state should not be inherited by newly opened windows.

Actual Behavior

The fullscreen state appears to be inherited by newly opened windows when they are launched while another window is in fullscreen.

Workaround

Press Super + F to toggle fullscreen off after opening the terminal.

eds-4d5 avatar Aug 28 '26 13:08 eds-4d5

Traced to a specific mechanism, and there is a one-line change you can make today rather than waiting for the project to decide anything.

What is actually happening. This is not fullscreen state leaking by accident — it is a Hyprland option Omarchy sets on purpose. default/hypr/looknfeel.lua:110 sets misc.on_focus_under_fullscreen = 1. In Hyprland 0.56.2, when a new tiled window maps onto a workspace that already has a fullscreen window and the new window requested no fullscreen state of its own, that option decides what happens (src/desktop/view/Window.cpp:2435-2442): 0 opens the new window behind the fullscreen one without focusing it, 1 gives the new window the workspace's internal fullscreen mode — what you are seeing — and 2 takes the existing window out of fullscreen and opens the new one tiled. Hyprland's own default is 2; the option is declared in src/config/values/ConfigValues.cpp with default 2 and the names ignore / take_over / exit_fullscreen. Omarchy chose 1 in #2821 (later renamed from new_window_takes_over_fullscreen in #4025), so that launching an app while something is fullscreen brings it to the front instead of leaving it invisible behind. Your terminal is that same code path — nothing terminal-specific about it.

Workaround you can use now. This is a plain Hyprland option and your own config is loaded after Omarchy's defaults — ~/.config/hypr/hyprland.lua requires default.hypr.omarchy (which loads the shipped looknfeel) before it requires your hypr.looknfeel — so an override in ~/.config/hypr/looknfeel.lua wins:

hl.config({
  misc = {
    on_focus_under_fullscreen = 2,
  },
})

2 makes the fullscreen window drop out of fullscreen when your terminal opens; 0 leaves it fullscreen and opens the terminal behind it, unfocused. Either stops the terminal coming up fullscreen — pick whichever suits you. This affects every app, not just terminals, which is the same reason it is not a straightforward change to ship as a default.

PR #8899 does not fix this, so please do not wait on it. It adds fullscreen = false to the terminal window rule. In Hyprland the static fullscreen rule is the rule that makes a window fullscreen; the applicator stores the bool as given (WindowRuleApplicator.cpp:397-398) and the map path reads it back as static_.fullscreen.value_or(false) (Window.cpp:2222), so an explicit false and no rule at all take the same branch and neither touches the code above. Checked live on a disposable VM running Hyprland 0.56.2 with that branch applied: a terminal opened over a fullscreen window still came up fullscreen at full monitor size, identical to deleting the line entirely.

What is left is a decision, not a bug fix. Changing the option globally partly undoes what #2821 was added for. A terminals-only rule is technically possible — fullscreen_state = "0 0" sets requestedFSState, which wins at Window.cpp:2484 — but it still unfullscreens the previous window first (Window.cpp:2476-2479), so it is "exit fullscreen, for terminals" rather than leaving the other window alone. Which of those the project wants is the maintainer's call, so this stays open for them; the workaround above is not blocked on it.

Two reviewers looked at this: Opus 5 in Claude Code, and Codex at xhigh reasoning as an independent second opinion. Codex confirmed the value_or(false) mechanism and the config load order from source, and corrected the draft on one point — fullscreen_state = "0 0" had been described as a clean terminals-only exemption, and it is not, because of the unfullscreen at Window.cpp:2476-2479. It declined to confirm Hyprland's upstream default from the files it was given; that was then checked directly against ConfigValues.cpp at the 0.56.2 tag, and the attribution to #2821 against this repository's own history.

omarchybot avatar Aug 29 '26 12:08 omarchybot

Rechecked against current quattro: nothing has changed for this one. default/hypr/looknfeel.lua:111 still sets misc.on_focus_under_fullscreen = 1, so a terminal opened over a fullscreen window still takes over its fullscreen state, and the workaround in the comment above (on_focus_under_fullscreen = 2 or 0 in ~/.config/hypr/looknfeel.lua) still applies.

What is new is that the same setting is now behind two other reports, so whatever is decided here decides them too:

  • #13170 — Learn → Omarchy opens fullscreen over a fullscreen Firefox video. Same path as this issue: a new tiled window takes over the fullscreen state.
  • #13157 — dismissing the screensaver with a trackpad click leaves the app underneath fullscreen. Same setting, but acting on an existing window gaining focus rather than a new one, so it may want its own fix whichever way this goes.

Neither is a duplicate of this issue, and PR #13476, which clears fullscreen inside omarchy-launch-webapp for #13170, does not reach this one: Super+Return goes through omarchy-launch-terminal and never touches the web app launcher.

Checked by Opus 5.5 in Claude Code and by Codex at medium effort as a second opinion. Codex agreed on the mechanism and on #13476 not covering terminal launches (its independence is not guaranteed), and separated #13157 from the other two as a different focus path. Whether to keep take_over globally, change it, or carve out exceptions is still the maintainer's decision, so this stays open for them.

omarchybot avatar Oct 09 '26 05:10 omarchybot