Repository navigation
Don't open the menu when releasing Super after zooming - #866
Merged
Merged
Conversation
Member
|
Can you rebase this on git master? It looks like you're still patching against the source that pre-dates my other fix and they're conflicting in keybindings.c Thanks |
Scroll events consumed for the a11y mouse-wheel zoom bypass meta_keybindings_process_event entirely, so nothing cleared the modifier-only key state: pressing Super, zooming with the wheel and releasing Super still looked like a bare modifier tap and activated the overlay-key binding, popping up the Cinnamon menu after every zoom. Cancel the pending modifier-only state when a zoom scroll is consumed, and treat scroll events like button presses and touches when tracking modifier-only key state. This affects both X11 and Wayland sessions. Ref: linuxmint#695 Fixes: linuxmint/cinnamon#12587 Co-Authored-By: Claude Fable 5
AlexB7
force-pushed
the
zoom-fix-super
branch
from
September 30, 2026 13:34
8de0af8 to
8f252e4
Compare
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.
Fixes #695 (the "bonus bug" reported there)
The bug
With Accessibility → Zoom enabled and Super as the mouse-wheel modifier, holding Super, zooming with the wheel and then releasing Super opens the Cinnamon menu. The zoom works, but the menu pops up after every zoom.
This happens on both X11 and Wayland.
Root cause
Muffin tracks whether a modifier was pressed and released on its own ("modifier-only" bindings, used for the overlay key). Any other input in between, such as a key, button press or touch, cancels that state in
meta_keybindings_process_event.When the zoom branch in
meta_display_handle_event(events.c) consumes a scroll event, it jumps straight tooutand never callsmeta_keybindings_process_event. Nothing cancels the modifier-only state, so Super press → wheel zoom → Super release looks exactly like a bare Super tap and triggers the overlay key.The fix
meta_keybindings_cancel_modifier_only()and call it from the zoom branch inevents.cwhen a zoom scroll is consumed.meta_keybindings_process_event, treatCLUTTER_SCROLLlike button presses and touches, so a scroll with the modifier held also cancels the modifier-only state when it isn't consumed by zoom.A plain tap of Super still opens the menu as before.
Testing done
On Linux Mint 22.3, muffin 6.6.3 with this patch:
🤖 Generated with Claude Code