Skip to content

[Feat] Option to hide Heroic window on heroic:// launches (#5154)#5501

Open
flavioislima wants to merge 6 commits intomainfrom
feat/protocol_no_gui
Open

[Feat] Option to hide Heroic window on heroic:// launches (#5154)#5501
flavioislima wants to merge 6 commits intomainfrom
feat/protocol_no_gui

Conversation

@flavioislima
Copy link
Copy Markdown
Member

@flavioislima flavioislima commented Apr 21, 2026

Summary

Closes #5154. Lets users launch games via heroic:// URLs without the Heroic window appearing first — handy when launching from Steam Big Picture, other frontends, or .desktop shortcuts.

Two complementary knobs:

  • Global setting: new Hide Heroic window when launching games from heroic:// links toggle under Settings → General (default off).
  • Per-URL override: append gui=false (also accepts gui=0 / gui=no) to any heroic://launch URL, e.g. heroic://launch?appName=Quail&runner=legendary&gui=false.

Either source is respected in three places:

  • at startup (URL on argv → window never shown)
  • on second-instance (URL on argv → no forced mainWindow.show())
  • while already running (URL received via the protocol handler → already-visible window is hidden after dispatching the launch)

If the game is not installed, the install confirmation dialog still pops the window, since it needs user input.

Test plan

  • Add a Heroic game to Steam with the new setting enabled → launch from Big Picture; confirm no Heroic window appears
  • With the setting off, launch heroic://launch?appName=…&gui=false and confirm window stays hidden
  • Launch heroic://launch?appName=… with setting off and confirm default behaviour is unchanged
  • Try a heroic://launch/<uninstalled-game> with hide enabled; confirm install dialog still shows the window

New AppSettings field (default false) that will be read by the protocol
handler to decide whether to skip showing the main window on heroic://
launches.
Support two ways to launch a game via the heroic:// protocol without
popping up the main window:
- per-URL `gui=false` (also `gui=0` / `gui=no`) query parameter
- the new `hideWindowOnProtocolLaunch` global setting

The hide logic runs in three places: startup (include it in the
`headless` computation), second-instance (skip the forced
`mainWindow.show()`), and inside `handleLaunch` (hide the already-visible
window after dispatching the launch). When the game is not installed,
the install dialog still needs the window, so it is shown.
New toggle under General settings so users can opt into skipping the
Heroic window for all heroic:// launches, plus the matching English
translation string.
@flavioislima flavioislima added the pr:testing This PR is in testing, don't merge. label Apr 21, 2026
Briefly explains the use case (launching from external shortcuts like
Steam's 'Add to Steam') so users know what the toggle does without
having to read the docs.
@flavioislima flavioislima force-pushed the feat/protocol_no_gui branch from 9e4e2ae to 1dbf9c9 Compare April 21, 2026 23:30
@flavioislima flavioislima added pr:ready-for-review Feature-complete, ready for the grind! :P and removed pr:testing This PR is in testing, don't merge. labels May 6, 2026
@flavioislima flavioislima requested review from a team, CommandMC, Etaash-mathamsetty, arielj, biliesilva and imLinguin and removed request for a team May 6, 2026 20:12
@flavioislima flavioislima added this to the 2.22 milestone May 6, 2026
# Conflicts:
#	src/frontend/screens/Settings/sections/AdvancedSettings/index.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:ready-for-review Feature-complete, ready for the grind! :P

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to run without GUI when opening heroic:/ intents via xdg

1 participant