Repository navigation
fix(context-menu): ignore non-primary clicks on menu rows - #2190
Merged
l0gicgate merged 2 commits intoNov 12, 2026
Merged
Conversation
Drop secondary and middle button releases in the context menu release guard so non-primary clicks do not activate GtkModelButton rows via GTK's unpaired-release mechanism. Closes lgse#2109
Update entry-menu-named-actions quality.note with right-click row rejection and clarify is_primary_button scope.
This was referenced Nov 12, 2026
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.
Description
In an open context menu, secondary (right) or middle clicking any row ran that row, exactly like a primary click (#2109). This happened because GTK's
GtkModelButtonuses a primary-only click gesture, butgtk_gesture_click_handle_eventemitsunpaired-releasefor non-primary button releases when the gesture has no active press.gesture_unpaired_releaseingtkmodelbutton.cthen activates the button without checking which button was released.The context menu's
guard_unpaired_releasenow verifies that releases belong to the primary mouse button (BUTTON_PRIMARY) in addition to verifying that a press was observed inside the menu, dropping secondary and middle releases before they reachGtkModelButton.Visual evidence
screenrecording-2026-11-12_18-08-58.mp4
How to test
Expected result: The menu stays open and the row action does not execute. Primary clicks (left click), Enter, and Space continue to activate rows normally.
Related issue
Closes #2109