fix(ui): a click on the Insert menu's page no longer leaves the page drawn over the game after the menu closes #3058
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3058
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/menu-stays"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
After a mouse click on the Insert menu's page, closing the menu could leave a picture of the page (its tabs and rows,
no card, no hint bar, a stray "..." at its top left) drawn over the game. Reopening and closing the menu did not clear it.
Cause: a left press on the hosted page went through
Core::left_press's window branch. That branch raises a window onthe z order and pushed the hosted page there too. Nothing took the page out again. With the menu closed,
shown_orderstill listed the page from
z, so it was laid out unhosted: no banner, so its top Tabs and banner action were paintedin the page. It was then pushed as a
SCREENroot, whichui_drawdraws whatever the menu's state. Thevk: UI: a hosted root ... not drawnguard only looks atHOSTEDroots, so it never fired.Fix (
game/crates/ui/src/core.rs): a click raises only real windows, not the hosted page, andshown_ordertakes onlymounted
Windowroots from the z order.Read first:
Core::left_press,Core::shown_order.Testing
Tested: game-free only.
game-ui's new testthe_hosted_page_clicked_is_gone_from_the_frame_when_the_menu_closesfails on
main("the page is not shown with the menu closed") and passes here. All 159game-uitests pass, andclippy
-D warningsand rustfmt are clean. Not yet run in the game.Still to test:
of the menu left on screen. (by hand)
Measurements
Nothing to measure: a fix to which UI roots are shown, with no cost per frame.
Risks
A root kept on the z order whose mount is no longer a window is no longer shown from it. That is intended: only windows
belong there. A revert is enough. Players notice nothing after updating except that the stuck menu picture is gone.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (onlygame-ui's tests run so far)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ
WIP: fix(ui): a click on the Insert menu's page no longer leaves the page drawn over the game after the menu closesto fix(ui): a click on the Insert menu's page no longer leaves the page drawn over the game after the menu closes