Skip to content

Fix popup menu positioning when menu overflows below window#79

Open
danielraffel wants to merge 1 commit intoVitalAudio:mainfrom
danielraffel:fix/popup-menu-overflow-position
Open

Fix popup menu positioning when menu overflows below window#79
danielraffel wants to merge 1 commit intoVitalAudio:mainfrom
danielraffel:fix/popup-menu-overflow-position

Conversation

@danielraffel
Copy link
Copy Markdown
Contributor

When a popup menu doesn't fit below its source frame, the fallback position uses point.y directly when a custom offset is set. Since point.y is relative to the source frame rather than the window, the menu appears at the wrong position — often near the top of the screen instead of just above the trigger element.

This uses window_bounds.y() consistently so the menu appears directly above the source frame regardless of whether a custom point offset was provided.


Discovered while working on a macOS JUCE audio plugin that uses Visage for its UI. This PR was put together with the help of Claude. Completely understand if you'd prefer to close this — just wanted to share the fix since we've been patching around it on our end whenever we update Visage.

When a popup menu doesn't fit below its source frame, the fallback
position calculation uses `point.y` directly when a custom offset is
set. This value is relative to the source frame, not the window, so
the menu ends up at the wrong position (often near the top of the
screen).

Use window_bounds.y() consistently so the menu appears directly above
the source frame regardless of whether a custom point offset was
provided.
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.

1 participant