Skip to content

Add configurable tile-edge-zone-width setting - #853

Open
rkristelijn wants to merge 1 commit into
linuxmint:masterfrom
rkristelijn:feature/configurable-tile-zone-width
Open

Add configurable tile-edge-zone-width setting#853
rkristelijn wants to merge 1 commit into
linuxmint:masterfrom
rkristelijn:feature/configurable-tile-zone-width

Conversation

@rkristelijn

Copy link
Copy Markdown

Summary

Adds a new org.cinnamon.muffin gsetting tile-edge-zone-width to make the edge/corner tile snap zones configurable.

Fixes #852

Problem

The tile snap zones are hardcoded to 1-2 pixels (ORIGIN_CONSTANT = 1, EXTREME_CONSTANT = 2 in src/core/window.c). For corner (quarter) tiling, the user must hit both zones simultaneously, making the effective target ~2×2 pixels. This is nearly impossible to hit consistently, especially on multi-monitor setups where the cursor overshoots onto the adjacent display.

Solution

  • Add tile-edge-zone-width gsetting (int, default 25, range 2–100)
  • Replace hardcoded constants with the setting value
  • Follows the exact same pattern as draggable-border-width

Changes

File Change
data/org.cinnamon.muffin.gschema.xml.in New key definition
src/meta/prefs.h Enum value + getter declaration
src/core/prefs.c Static var, array entry, getter function
src/core/window.c Use setting instead of hardcoded constants

Testing

  • No existing test suite for zone detection logic
  • Local testing is invasive (requires replacing running WM)
  • Relies on CI build check to verify compilation
  • Manual testing: gsettings set org.cinnamon.muffin tile-edge-zone-width 25 then drag windows to corners — quarter tiling triggers reliably vs the previous 1-2px

Usage

# Set zone width to 50px (generous)
gsettings set org.cinnamon.muffin tile-edge-zone-width 50

# Restore default
gsettings reset org.cinnamon.muffin tile-edge-zone-width

# Original behavior (2px)
gsettings set org.cinnamon.muffin tile-edge-zone-width 2

The corner tile snap zones were hardcoded to 1-2 pixels, making quarter
tiling via drag nearly impossible to trigger, especially on multi-monitor
setups where the cursor easily overshoots onto the adjacent display.

Add a new org.cinnamon.muffin gsetting 'tile-edge-zone-width' (int,
default 25, range 2-100) that controls the width of the edge zone where
dragging triggers tiling.

Follows the same pattern as draggable-border-width.

Fixes: linuxmint#852
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.

Corner tile snap zone too small (1-2px) — make configurable

1 participant