mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
automaximize: Make it optional
Make automaximize optional by adding a gsetting "auto-maximize" (defaults to true). https://bugzilla.gnome.org/show_bug.cgi?id=680990
This commit is contained in:
@ -99,6 +99,7 @@ static gboolean resize_with_right_button = FALSE;
|
||||
static gboolean edge_tiling = FALSE;
|
||||
static gboolean force_fullscreen = TRUE;
|
||||
static gboolean ignore_request_hide_titlebar = FALSE;
|
||||
static gboolean auto_maximize = TRUE;
|
||||
|
||||
static GDesktopVisualBellType visual_bell_type = G_DESKTOP_VISUAL_BELL_FULLSCREEN_FLASH;
|
||||
static MetaButtonLayout button_layout;
|
||||
@ -368,6 +369,13 @@ static MetaBoolPreference preferences_bool[] =
|
||||
},
|
||||
&no_tab_popup,
|
||||
},
|
||||
{
|
||||
{ "auto-maximize",
|
||||
SCHEMA_MUTTER,
|
||||
META_PREF_AUTO_MAXIMIZE,
|
||||
},
|
||||
&auto_maximize,
|
||||
},
|
||||
{ { NULL, 0, 0 }, NULL },
|
||||
};
|
||||
|
||||
@ -1666,6 +1674,9 @@ meta_preference_to_string (MetaPreference pref)
|
||||
|
||||
case META_PREF_DYNAMIC_WORKSPACES:
|
||||
return "DYNAMIC_WORKSPACES";
|
||||
|
||||
case META_PREF_AUTO_MAXIMIZE:
|
||||
return "AUTO_MAXIMIZE";
|
||||
}
|
||||
|
||||
return "(unknown)";
|
||||
@ -2091,6 +2102,12 @@ meta_prefs_get_edge_tiling ()
|
||||
return edge_tiling;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_prefs_get_auto_maximize (void)
|
||||
{
|
||||
return auto_maximize;
|
||||
}
|
||||
|
||||
MetaKeyBindingAction
|
||||
meta_prefs_get_keybinding_action (const char *name)
|
||||
{
|
||||
|
@ -3020,7 +3020,7 @@ meta_window_show (MetaWindow *window)
|
||||
|
||||
if (!window->placed)
|
||||
{
|
||||
if (window->showing_for_first_time && window->has_maximize_func)
|
||||
if (meta_prefs_get_auto_maximize() && window->showing_for_first_time && window->has_maximize_func)
|
||||
{
|
||||
MetaRectangle work_area;
|
||||
meta_window_get_work_area_for_monitor (window, window->monitor->number, &work_area);
|
||||
|
Reference in New Issue
Block a user