fix(gui): open the notebook tab context menu at the pointer - #743
Merged
Conversation
CMuleNotebook::OnRMButton passed event.GetPosition() to PopupMenu() for the built-in Close/Close-tab menu. On wxGTK the right-click lands on the tab strip, which sits outside the client area PopupMenu() positions against, so the coordinate was offset by the tab-strip height and the menu opened above the tab instead of at the cursor. Drop the explicit position so it opens at the pointer.
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.
The right-click context menu on notebook tabs (e.g. the search-results tabs) opened misplaced on wxGTK — above the tab, near the top of the notebook, instead of at the cursor.
CMuleNotebook::OnRMButtonpassedevent.GetPosition()toPopupMenu(). The right-click lands on the tab strip, which on a native wxGTKwxNotebooksits outside the client areaPopupMenu()positions against, so the menu was offset upward by the tab-strip height. Dropping the explicit position lets it open at the pointer (wxMSW/wxOSX already default to the cursor, so no change there).Verified on Linux (wxGTK): right-clicking a search-result tab now opens the menu at the cursor, and Close / Close all tabs / Close other tabs still act on the correct tab.