8000 fix: store the returned handle for posix, wasm and redox menu items by SAY-5 · Pull Request #442 · emoon/rust_minifb · GitHub
[go: up one dir, main page]

Skip to content

fix: store the returned handle for posix, wasm and redox menu items - #442

Merged
emoon merged 1 commit into
emoon:masterfrom
SAY-5:fix-menu-item-handle
Oct 19, 2026
Merged

emoon merged 1 commit into
emoon:masterfrom
SAY-5:fix-menu-item-handle

Conversation

@SAY-5
@SAY-5 SAY-5 commented Oct 18, 2026
Copy link
Copy Markdown
Contributor

add_menu_item on the posix, wasm and redox backends stored item_counter after next_item_handle() had already bumped it, so each item kept the returned handle + 1 and remove_item with that handle removed the previous item or nothing. Store the handle that is returned instead, with a test in posix/common.rs that fails on master.

This only covers the wasm/redox bullet of #417 (posix had the same line); the Windows and macOS menu items are untouched.

Part of #417

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
@emoon
emoon merged commit 269304c into emoon:master Oct 19, 2026
5 checks passed
@emoon
emoon commented Oct 19, 2026
Copy link
Copy Markdown
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0