mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 09:00:25 +02:00
Closing Steam with X now marks it hidden (state steamHidden). Before, bar-only ended as soon as any window became active, so closing a docked window afterwards let stock SteamVR fall back to Steam. While hidden, the stock fallbacks go to the most recently active other docked window with a tab, else bar-only: - autoSwitchOverlayIfNeeded with no active frame; - the dashboard mailbox's dashboard_overlay_destroyed handler (stock: switchToHomeOverlay -> Steam); - show/switch requests for Steam with reason "theater frame destroyed" (key removed) or "SetDockLocation" (echo of X docking Steam: dropped). Steam becoming the active frame (tab click, Steam menu pick, SwitchToDashboardOverlay) ends hidden. The hidden state replaces the rule that swallowed the first ShowOverlay(main) from Steam after each dashboard open in bar-only (Steam doesn't send one there; its only effect was eating a real Steam menu pick). Version 7; state of versions 5/6 is taken over (bar-only implies hidden), their fields are left for a rollback. Signatures: mailbox and dashboard handler anchors, the ShowOverlay ones dropped.
12 lines
500 B
JavaScript
12 lines
500 B
JavaScript
// Reverts steam-close-button/patch.js (the X disappears). Never switches
|
|
// frames and keeps window.__sfuiSteamCloseState (Steam hidden, bar-only), so
|
|
// a re-injection continues; restores the Dashboard methods and mailbox
|
|
// handlers it wrapped. If removed while bar-only, the dashboard stays without
|
|
// an active frame until the next tab click or open. Safe when not patched.
|
|
(() => {
|
|
const s = window.__sfuiSteamClose;
|
|
if (!s) return 'not patched';
|
|
s.teardown();
|
|
return 'unpatched';
|
|
})()
|