Skip to content

fix: preserve Steam in tray and improve console controller settings - #131

Merged
lippdev merged 4 commits into
mainfrom
fix/steam-tray-console-controller-ui
Oct 3, 2026
Merged

lippdev merged 4 commits into
mainfrom
fix/steam-tray-console-controller-ui

Conversation

@lippdev

@lippdev lippdev commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Restore-to-PC previously invoked Steam shutdown, which terminated the client. Close the eligible Steam client window instead, preserving the process and the existing running-game guards.

Improve controller settings inside the console/TV interface: group controller options, persist Auto/Xbox/PlayStation button symbols, enlarge shortcut editor cards and actions, and prevent focus from landing on non-action containers.

Validation: Windows x64 build passed (0 errors; existing warnings), 293 unit tests passed, git diff --check passed. Visually checked the running console UI and directional focus between Change, Remove and Back; verified layout persistence. Physical DualShock and actual Steam tray behavior remain manual checks in docs/TESTING.md.

@lippdev
lippdev marked this pull request as ready for review October 3, 2026 15:03
@lippdev
lippdev merged commit 8ed849f into main Oct 3, 2026
4 checks passed

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Minor suggestion: make Steam window selection deterministic.

Reviewed changes Reviewed Steam restore behavior and the console controller settings and shortcut-editor changes.

  • Steam tray behavior Replaces client shutdown with a window-close request while preserving the running-game guard.
  • Controller settings Adds a persisted button-symbol layout and revises console settings and shortcut-editor navigation.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6-luna | 𝕏

if (processNames.TryGetValue(unchecked((int)processId), out var processName) &&
SteamShutdown.IsClientWindowCandidate(processName, title.ToString(), className.ToString(), NativeWindows.IsWindowVisible(hwnd), hasOwner))
{
target = hwnd;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When multiple Steam-owned top-level windows match the predicate, this closes whichever EnumWindows returns first, including matches from steamwebhelper; enumeration order does not identify the primary client window. A non-primary match can leave the desktop client visible or close the wrong Steam window, so select or verify the client window before posting WM_CLOSE.

Technical details
# Identify the Steam client window deterministically

## Affected sites
- `src/ConsoleMode/Services/SteamSession.cs:61-77` — stops at the first matching HWND and posts `WM_CLOSE` to it.
- `src/ConsoleMode/Services/SteamShutdown.cs:8-15` — permits candidates from both `steam` and `steamwebhelper` without distinguishing the main client window.

## Required outcome
- Close only the main Steam client window to the tray; do not depend on top-level window enumeration order or close an unrelated Steam-owned window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant