Repository navigation
Conversation
The question "An optimize run is in progress. Stop it and exit?" is a modal MessageBox, which keeps messages flowing: the tray menu still opened, and its Exit asked a second question on top of the first. The app then exited only once both were answered (#82, seen in check 108 D). While the question is open, a click on the tray icon now brings it forward instead of opening the menu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Part of #82: the first fix, only one Exit question at a time. The other items of #82 (Quiet across the restart as administrator, the "Stopping…" state, a real Windows sign-in after the update) are not touched, so this PR does not close the issue.
The problem
During an optimize run, the tray's Exit asks "An optimize run is in progress. Stop it and exit?". That question is a modal
MessageBoxW, and a modal message box keeps messages flowing. A click on the tray icon therefore still reachedtray_menu, the menu opened again, and choosing Exit there opened a second question on top of the first. The app exited only once both were answered (seen in check 108, D).The change
One file,
src/app/gui/main_gui.cpp(+18/−6):Appgetsbool exit_question, true while that question is open.case kMenuExit:sets it beforeMessageBoxWand clears it right after. What the question says, and what Yes and No do, are unchanged.tray_menureturns at the start whileexit_questionis set. It brings the open question forward withSetForegroundWindow(GetLastActivePopup(g.hwnd))instead of building a menu, so a second question cannot be asked.Of the options in #82 (Exit disabled, ignored, or the existing question brought forward) this takes the last: a click on the tray icon still does something visible.
Tests
cmake --workflow --preset ci(Release,/W4 /WX), with no warnings.core_tests: 501 test cases, 11735 assertions, all passed.app_tests: passed.main_gui.cpp, and the test executables have no seam there without UI automation.Manual validation still needed
This has not been checked by hand with a real Windows tray. Steps:
🤖 Generated with Claude Code