diff --git a/data/org.cinnamon.muffin.gschema.xml.in b/data/org.cinnamon.muffin.gschema.xml.in
index 88d7be2c7..3afea56a0 100644
--- a/data/org.cinnamon.muffin.gschema.xml.in
+++ b/data/org.cinnamon.muffin.gschema.xml.in
@@ -51,6 +51,19 @@
+
+ 25
+
+ Width of the edge zone that triggers window tiling
+
+ The width in pixels of the screen edge zone where dragging a window
+ triggers tiling. For corner tiling (quarter screen), the cursor must
+ enter both the horizontal and vertical edge zones simultaneously.
+ Larger values make it easier to tile windows by dragging, especially
+ for corner tiling on multi-monitor setups.
+
+
+
false
Inverts the direction the left and right arrows take you when
diff --git a/src/core/prefs.c b/src/core/prefs.c
index 5caa592f2..f76cf5609 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -141,6 +141,7 @@ static char *iso_next_group_option = NULL;
static MetaX11BackgroundTransition background_transition = META_X11_BACKGROUND_TRANSITION_BLEND;
static gboolean unredirect_fullscreen_windows = FALSE;
static gboolean tile_maximize = FALSE;
+static int tile_edge_zone_width = 25;
static gboolean invert_workspace_flip = FALSE;
static char *gtk_theme = NULL;
static char *bell_sound = NULL;
@@ -610,6 +611,13 @@ static MetaIntPreference preferences_int[] =
},
&draggable_border_width
},
+ {
+ { "tile-edge-zone-width",
+ SCHEMA_MUFFIN,
+ META_PREF_TILE_EDGE_ZONE_WIDTH,
+ },
+ &tile_edge_zone_width
+ },
{
{ "drag-threshold",
SCHEMA_MOUSE,
@@ -2423,6 +2431,12 @@ meta_prefs_get_tile_maximize (void)
return tile_maximize;
}
+int
+meta_prefs_get_tile_edge_zone_width (void)
+{
+ return tile_edge_zone_width;
+}
+
gboolean
meta_prefs_get_auto_maximize (void)
{
diff --git a/src/core/window.c b/src/core/window.c
index 3a69000ec..0e7f1339b 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -6597,8 +6597,8 @@ enum {
#define BOX_CENTER_X(box) ((box).x + (box).width / 2) /* Center in X */
#define BOX_CENTER_Y(box) ((box).y + (box).height / 2) /* Center in Y */
-#define ORIGIN_CONSTANT 1
-#define EXTREME_CONSTANT 2
+#define ORIGIN_CONSTANT meta_prefs_get_tile_edge_zone_width ()
+#define EXTREME_CONSTANT meta_prefs_get_tile_edge_zone_width ()
#define COMMON_EDGE_PADDING 5
static void
diff --git a/src/meta/prefs.h b/src/meta/prefs.h
index 7953b7a5f..62e0856a1 100644
--- a/src/meta/prefs.h
+++ b/src/meta/prefs.h
@@ -121,6 +121,7 @@ typedef enum
META_PREF_MIN_WIN_OPACITY,
META_PREF_MOUSE_ZOOM_ENABLED,
META_PREF_TILE_MAXIMIZE,
+ META_PREF_TILE_EDGE_ZONE_WIDTH,
META_PREF_GTK_THEME,
META_PREF_BELL_SOUND,
META_PREF_BRING_WINDOWS_TO_CURRENT_WORKSPACE,
@@ -212,6 +213,9 @@ gboolean meta_prefs_get_edge_tiling (void);
META_EXPORT
gboolean meta_prefs_get_tile_maximize (void);
+META_EXPORT
+int meta_prefs_get_tile_edge_zone_width (void);
+
META_EXPORT
gboolean meta_prefs_get_auto_maximize (void);