Repository navigation
Conversation
Without "keep Battle.net in the background", the per-account tweaks write HideOnClose=false and DisplayExitPrompt=false, so closing the client's window quits it at once. A hand-off to a client started in the tray still sent WM_DELETE_WINDOW to push the window back, and the client exited 35 ms after GameLaunching=1, before the game's process existed. The launch was lost and Lightforge waited out the full 180 s. The tray keeper now runs only where closing hides the window (close_hides_window). The 180 s game wait also ran inside spawn_blocking. The runtime waits for blocking tasks when it shuts down, so a window closed during the wait stayed on screen, unresponsive, until it ran out. The wait is now async, one blocking scan per poll, and it ends early when the client is gone with no new game.
Author
|
Tested live with a release build of this branch (148e04c), same machine and settings as the report: background off, start minimized on, client 2.53.8, GE-Proton11-7. Before (beta.11), the client exited mid-launch: With this PR, the client starts in the tray, no Lightforge: Ready for review from my side. |
Member
|
hey, as far as i know i have already fixed that because of an issue i will go over your PR today and check it will be in the next release. thank you |
Member
|
Checked it again, already done on dev. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With "keep Battle.net in the background" off and "start Battle.net minimized" on, "Launch via Battle.net" never started the game, and the window went unresponsive for the full 180 s hand-off timeout. It reproduced on every hand-off since 2026-11-08 (1.0.0-beta.11, GE-Proton11-7, Fedora 45 KDE Wayland, client 2.53.8).
1. The tray keeper quits the client mid-launch
account_tweaks(false)writesHideOnClose=false("closing the window quits") andDisplayExitPrompt=false.launch_via_battle_netstill armsClientWindows::keep_closedfor a client started in the tray. ItsWM_DELETE_WINDOWis therefore a quit, and the client exits with the launch in flight:Lightforge:
sent Battle.net's window back to the tray 1 time(s), thenno game started within 180s. Agent never saw Wow.exe. The one hand-off that worked was started as a normal window (--from-launcher, no tray), sotraywasNoneand nothing was closed.Fix:
battlenet::close_hides_window(background)reads the same account tweaks, and the tray keeper runs only when it's true. Without it, the client shows its window for the ~2-3 s until the game is up, then exits asGameLaunchWindowBehavior: 2intends.2. The 180 s wait blocks shutdown
The game wait (
preflight::wait_for_game_start) ran insidespawn_blocking, and the tokio runtime waits for blocking tasks on shutdown. Closing the window during a hand-off left it on screen and unresponsive, with the main thread parked infutex_wait, until the wait ran out. The process exited in the same second as theno game started within 180swarning.Fix: after the launch is sent and taken,
wait_for_handoffawaits the wait: one blocking scan (preflight::game_started, split out ofwait_for_game_start) perHANDOFF_POLL. It also returnsHandoff::ClientClosedonce the client has been gone for two looks in a row with no new game, instead of polling an empty prefix for three minutes.GameLaunchWindowBehavior: 2exits only after the game is up, so a game that wins that race is still found first.Testing
cargo test --workspace: all pass, including the newonly_a_background_client_survives_its_window_being_closed.cargo clippy --all-targets: clean.Related, Not in This PR
PROTON_ENABLE_WAYLAND,PROTON_ENABLE_NVAPIandLD_PRELOAD. The hand-off starts the client withbattle_net_tweaksonly, so the game Battle.net spawns inherits none of them.account.db(New selection for product group WoW: ... name=WoW4, logged asGAME_ACCOUNT=WoW4at launch), and silently falls back to a default on a fresh prefix. Direct Play leaves it to the client'sSET accountList "...|!WoW4|..."inConfig.wtf. A per-product "game account" setting, a warning when Battle.net's selection differs, or a "Launching as WoW4" status line would make a wrong pick visible.