Skip to content

Don't open the menu when releasing Super after zooming - #866

Merged
mtwebster merged 1 commit into
linuxmint:masterfrom
AlexB7:zoom-fix-super
Sep 30, 2026
Merged

mtwebster merged 1 commit into
linuxmint:masterfrom
AlexB7:zoom-fix-super

Conversation

@AlexB7

@AlexB7 AlexB7 commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

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 to out and never calls meta_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

  • Add meta_keybindings_cancel_modifier_only() and call it from the zoom branch in events.c when a zoom scroll is consumed.
  • In meta_keybindings_process_event, treat CLUTTER_SCROLL like 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:

  • X11: releasing Super after zooming no longer opens the menu (also verified over VNC).
  • Wayland: releasing Super after zooming no longer opens the menu.
  • A plain Super tap still opens the menu. Alt-Tab, window drag and unmodified scrolling are unchanged.

🤖 Generated with Claude Code

@mtwebster

Copy link
Copy Markdown
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
@mtwebster
mtwebster merged commit 1dd3389 into linuxmint:master Sep 30, 2026
4 checks passed
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.

Desktop Zoom Mouse Wheel scrolling also scrolls XInput2 application window contents

2 participants