Skip to content

MENUPICK: pointer-based selection for shortcut-less menu items (#63) - #79

Merged
sidick merged 1 commit into
mainfrom
menupick-pointer
Aug 9, 2026
Merged

sidick merged 1 commit into
mainfrom
menupick-pointer

Conversation

@sidick

@sidick sidick commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • MENUPICK previously 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.
  • New AmipMenuPickByPointer() (server/src/action.c) resolves menu geometry live off the actual struct Menu/MenuItem fields at pick time — never cached — since layout is font-dependent.
  • Two real findings from live testing under Copperline, documented in code comments and 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 own LeftEdge playing no part in X placement — undocumented by the RKRM.
  • New AMIP_MENUPICK_RMB_TRAPPED / AMIP_MENUPICK_GEOMETRY_FAILED result codes, both mapped to the existing RC 20 tier with honest, specific result text.
  • Docs updated: 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 server clean under -Wall -Wextra -Werror (Docker cross-build)
  • make test-host (234 host unit tests)
  • tests/copperline/run.sh's run_menu_check — new MENUPICK-TOGGLE-POINTER PASS and MENUPICK-SUBITEM-POINTER PASS, existing MENUPICK-ABOUT/MENUPICK-SUBITEM/MENUPICK-DISABLED (shortcut path) unchanged and passing
  • run_golden_check, run_click_check, run_type_check — no regressions from the AmipFindMenuItem refactor
  • Confirmed no debug scaffolding leaked into the diff

Closes #63.

https://claude.ai/code/session_018CbPo4nMpnM5JQX3LKE5JP

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
@sidick
sidick merged commit 92a2493 into main Aug 9, 2026
7 checks passed
@sidick
sidick deleted the menupick-pointer branch August 9, 2026 13:54
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.

MENUPICK: pointer-based selection for shortcut-less menu items

1 participant