Repository navigation
fix(widgets): don't respawn widgets destroyed by game mode suspension - #1865
Merged
Merged
Conversation
suspend_all() clears every pod when game mode starts, which destroys the webviews. The Destroyed handler then called start_all_webviews() unconditionally, so the toolbar and dock came back a second later on top of the fullscreen game. Skip the respawn while GAME_MODE_ACTIVE is set; resume_all() starts them again when game mode ends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
eythaann
enabled auto-merge (squash)
September 27, 2026 19:56
eythaann
disabled auto-merge
September 28, 2026 08:35
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 Suspend widgets on Game Mode enabled, the toolbar and dock come back about a second after a fullscreen game starts and stay on top of it.
WidgetManager::suspend_all()setsGAME_MODE_ACTIVEand clears every pod, which drops the webviews. Each webview'sWindowEvent::Destroyedhandler inwidgets/loader.rsthen runsreconcile()+start_all_webviews()unconditionally, so every widget gets recreated right away, in the middle of game mode.Log with 2.8.6 (Age of Empires II DE, borderless fullscreen):
This looks like the same root cause as #1565 (widgets reappearing and stealing focus from fullscreen games with this setting on).
Fix
Skip the respawn in the
Destroyedhandler whileGAME_MODE_ACTIVEis set.reconcile()still runs, so the pods are recreated inPendingandresume_all()starts them when game mode ends, as before.Testing
Tested on Windows 11 with a local debug build of this branch, two monitors, same game:
droppedand not recreated; no bar over the game.Creating → Mounting → Readywithin ~2 s on both monitors.CI passed on the fork. Not tested: exclusive-fullscreen games, lazy widgets, or a monitor being connected/disconnected while game mode is active.
🤖 Generated with Claude Code