MENUPICK: pointer-based selection for shortcut-less menu items (#63) - #79
Merged
Merged
Conversation
MENUPICK previously only worked for items with a real keyboard shortcut. Items without one are now picked via a genuine synthesized right-mouse-button down/move/move/release sequence instead of being rejected outright, matching the "real input.device events, not a shortcut" principle every other verb already follows. Two real findings from live testing under Copperline: - RMB-down alone only switches the screen's title bar into menu mode; the pointer must then be moved onto the target menu's own title text before the pulldown actually opens. - A one-level submenu's screen-absolute box left-anchors flush against its parent item's right edge (parentLeft + parentWidth) -- the sub-item's own LeftEdge plays no part in X placement, unlike its TopEdge which is a genuine per-item stacking offset. The RKRM doesn't document this placement at all. Verified end to end against two new shortcut-less items on fixtures/gadtools-app's own menu strip (a top-level item and a one-level submenu item), plus the full existing regression suite (click/type/menu/golden-tree checks, 234 host unit tests). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018CbPo4nMpnM5JQX3LKE5JP
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.
Summary
MENUPICKpreviously rejected any menu item with no keyboard shortcut outright (RC 20) — now such items are picked via a genuine synthesized right-mouse-button down/move/move/release sequence, chosen automatically whenever an item has no shortcut, matching the "real input.device events, not a shortcut" principle every other verb (CLICK/DRAG) already follows.AmipMenuPickByPointer()(server/src/action.c) resolves menu geometry live off the actualstruct Menu/MenuItemfields at pick time — never cached — since layout is font-dependent.server/README.md: (1) RMB-down alone only switches the screen's title bar into menu mode — the pointer must then move onto the target menu's own title text before the pulldown opens; (2) a one-level submenu's screen-absolute box left-anchors flush against its parent item's right edge, with the sub-item's ownLeftEdgeplaying no part in X placement — undocumented by the RKRM.AMIP_MENUPICK_RMB_TRAPPED/AMIP_MENUPICK_GEOMETRY_FAILEDresult codes, both mapped to the existing RC 20 tier with honest, specific result text.server/README.md,userdocs/ARexx-Reference.md,userdocs/Wire-Protocol.md,userdocs/Changelog.md,tests/copperline/README.md,CLAUDE.md.Test plan
make amiga fixtures serverclean under-Wall -Wextra -Werror(Docker cross-build)make test-host(234 host unit tests)tests/copperline/run.sh'srun_menu_check— newMENUPICK-TOGGLE-POINTER PASSandMENUPICK-SUBITEM-POINTER PASS, existingMENUPICK-ABOUT/MENUPICK-SUBITEM/MENUPICK-DISABLED(shortcut path) unchanged and passingrun_golden_check,run_click_check,run_type_check— no regressions from theAmipFindMenuItemrefactorCloses #63.
https://claude.ai/code/session_018CbPo4nMpnM5JQX3LKE5JP