From ae80350494d7e0756ab51191092db4347defa030 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Mon, 28 Oct 2019 12:12:43 -0400 Subject: 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). --- src/core/prefs.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/core/prefs.c') 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) { -- cgit v1.2.1