summaryrefslogtreecommitdiff
path: root/src/core/prefs.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2019-10-28 12:12:43 -0400
committerraveit65 <[email protected]>2019-10-31 09:51:11 +0100
commitae80350494d7e0756ab51191092db4347defa030 (patch)
tree27e5ac349738590d490bd2ab2781a27e3d6ad950 /src/core/prefs.c
parent3523b6b7c0aaa47cc00b176769d248f77ca8751c (diff)
downloadmarco-ae80350494d7e0756ab51191092db4347defa030.tar.bz2
marco-ae80350494d7e0756ab51191092db4347defa030.tar.xz
window: Add optional tile size cycling
Adding a new option to allow tile size cycling. When enabled, using the keyboard shortcut for tiling multiple times in a row cycles the window through different sizes (1/2 -> 1/3 -> 1/4 -> 3/4 -> 2/3 -> Untiled).
Diffstat (limited to 'src/core/prefs.c')
-rw-r--r--src/core/prefs.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/prefs.c b/src/core/prefs.c
index df6bed14..f7df9f39 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -130,6 +130,7 @@ static gboolean center_new_windows = FALSE;
static gboolean force_fullscreen = TRUE;
static gboolean allow_tiling = FALSE;
static gboolean allow_top_tiling = TRUE;
+static gboolean allow_tile_cycling = TRUE;
static GList *show_desktop_skip_list = NULL;
static MetaVisualBellType visual_bell_type = META_VISUAL_BELL_FULLSCREEN_FLASH;
@@ -443,6 +444,12 @@ static MetaBoolPreference preferences_bool[] =
&allow_top_tiling,
FALSE,
},
+ { "allow-tile-cycling",
+ KEY_GENERAL_SCHEMA,
+ META_PREF_ALLOW_TILE_CYCLING,
+ &allow_tile_cycling,
+ FALSE,
+ },
{ "alt-tab-expand-to-fit-title",
KEY_GENERAL_SCHEMA,
META_PREF_ALT_TAB_EXPAND_TO_FIT_TITLE,
@@ -1700,6 +1707,9 @@ meta_preference_to_string (MetaPreference pref)
case META_PREF_ALLOW_TOP_TILING:
return "ALLOW_TOP_TILING";
+ case META_PREF_ALLOW_TILE_CYCLING:
+ return "ALLOW_TILE_CYCLING";
+
case META_PREF_PLACEMENT_MODE:
return "PLACEMENT_MODE";
@@ -2390,6 +2400,12 @@ meta_prefs_get_allow_top_tiling ()
return allow_top_tiling;
}
+gboolean
+meta_prefs_get_allow_tile_cycling ()
+{
+ return allow_tile_cycling;
+}
+
guint
meta_prefs_get_mouse_button_resize (void)
{