Fix intermittent app freeze when toggling fullscreen (F11 / player button)#398
Open
Fix intermittent app freeze when toggling fullscreen (F11 / player button)#398
Conversation
3 tasks
Agent-Logs-Url: https://github.com/RyanYuuki/AnymeX/sessions/3d892567-150e-4fcf-ab60-b8e524c1adbf Co-authored-by: itsmechinmoy <167056923+itsmechinmoy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Anymex desktop app freeze when entering full-screen mode
Fix intermittent app freeze when toggling fullscreen (F11 / player button)
Apr 14, 2026
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.
Rapid or concurrent fullscreen toggles (F11, Alt+Enter, player button) could send conflicting commands to the window manager before any single transition completed, causing the app to freeze — particularly on Windows with hybrid GPU setups.
Two bugs in
AnymexTitleBar(lib/widgets/custom_widgets/anymex_titlebar.dart):windowManager.setFullScreen()calls could race against each othertoggleFullScreen()read fromisFullScreen.value(local cache) instead of the actual OS window state, so any drift caused every subsequent toggle to issue the wrong commandChanges
AnymexTitleBar(anymex_titlebar.dart)_isTransitioningboolean guard — any call arriving while a transition is in progress is dropped immediately, preventing duplicate/conflicting window manager callssetFullScreen()andtoggleFullScreen()now callawait windowManager.isFullScreen()to read actual OS state rather than the cached value — once before toggling, once after to confirm final statetry/finallyto prevent permanent lock on exceptionType of Changes
Testing Notes
Manually verify: rapid F11 presses, clicking the player fullscreen button multiple times in quick succession, and Alt+Enter should no longer freeze the app.
Linked Issue(s)
Additional Context
Most reproducible on Windows with AMD integrated/discrete GPU combos (e.g. AMD Ryzen 5 5500U + Radeon), where the Windows DWM is slower to process fullscreen transitions.
Submission Checklist