Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions data/org.cinnamon.muffin.gschema.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@
</description>
</key>

<key name="tile-edge-zone-width" type="i">
<default>25</default>
<range min="2" max="100"/>
<summary>Width of the edge zone that triggers window tiling</summary>
<description>
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.
</description>
</key>

<key name="invert-workspace-flip-direction" type="b">
<default>false</default>
<summary>Inverts the direction the left and right arrows take you when
Expand Down
14 changes: 14 additions & 0 deletions src/core/prefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions src/core/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/meta/prefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);

Expand Down