linuxmint / linuxmint/muffin

Make Shift-driven legacy window snapping configurable

Open
#863 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
245
Forks
127
PR merge metrics
No merged PRs in 30d

Description

Distribution

Linux Mint Cinnamon 6.6.9 on X11

Package version

Muffin 6.6.3+zena

Graphics hardware in use

Not graphics-driver-specific; reproduced while moving ordinary application
windows on X11.

Frequency

Always

Problem

Muffin uses the physical Shift modifier as a hard-coded command to enable
legacy window snapping / edge resistance during a window move. This conflicts
with applications and Cinnamon extensions that intentionally use Shift as a
drag modifier. One example is FancyTiles, whose users may choose Shift to
match Windows FancyZones behaviour.

Setting org.cinnamon.muffin edge-tiling to false does not disable this
Shift-controlled behaviour. The interaction therefore remains active at
screen and monitor boundaries even when native edge tiling is disabled.

The behaviour comes from the two update_move() calls in
src/core/window.c, which receive CLUTTER_SHIFT_MASK during move events and
on completing the grab.

Steps to reproduce
  1. Disable Cinnamon edge tiling:
    gsettings set org.cinnamon.muffin edge-tiling false.
  2. Start moving a normal window with the mouse.
  3. Hold Left Shift while moving the window near screen or monitor edges.
  4. Observe Muffin's native Shift-driven edge resistance / snap behaviour.

With FancyTiles configured to use Shift, this occurs at the same time as the
extension is trying to display and apply its own zones, so the window movement
is visibly constrained or jumps to a native target.

Expected behaviour

Provide a Muffin preference to disable or rebind Shift-driven legacy snapping.
The existing behavior can remain the default, but users who use Shift for
another drag workflow should be able to opt out without rebuilding Muffin.

Additional information

This is related to, but not solved by, #657 and PR #828: those concern
window-to-window edge resistance only. This request covers the physical Shift
trigger and screen/monitor edge behaviour.

FancyTiles has an independent report of the user-facing conflict:
https://github.com/BasGeertsema/fancytiles/issues/38

I verified a local proof-of-concept which suppresses the Shift flag in both
move paths. It is intentionally not proposed as a global default because that
would remove existing legacy snapping for everyone. The patch and rebuild
notes are available here:
https://github.com/jonarihen/muffin-shift-snap-fix

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/core/window.c at the two update_move() calls receiving CLUTTER_SHIFT_MASK, then reproduce the behavior with the provided gsettings command and window-move steps. Done means Muffin exposes a preference to disable or rebind the legacy Shift trigger, while preserving the current default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.