summaryrefslogtreecommitdiff
path: root/src/core/prefs.c
diff options
context:
space:
mode:
authorMaxim Ermilov <[email protected]>2014-09-27 17:43:54 +0300
committerVictor Kareh <[email protected]>2018-08-28 09:38:37 -0400
commit37fecf49392eb10ada1f4bf481d6ad6be56891dd (patch)
tree77e7190c06f6590a11ff305ce4066daba9825851 /src/core/prefs.c
parent4f47c5be61320102120fcae6c8c04f63c5b4f5b5 (diff)
downloadmarco-37fecf49392eb10ada1f4bf481d6ad6be56891dd.tar.bz2
marco-37fecf49392eb10ada1f4bf481d6ad6be56891dd.tar.xz
Optionally attach modal dialogs
Add a preference /apps/mutter/general/attach_modal_dialogs. When true, instead of having independent titlebars, modal dialogs appear attached to the titlebar of the parent window and are moved together with the parent window. https://bugzilla.gnome.org/show_bug.cgi?id=612726 NOTE: Patch copied from mutter and adapted for metacity.
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 e376089c..048b738a 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -96,6 +96,7 @@ static MetaVirtualModifier mouse_button_mods = Mod1Mask;
static MetaFocusMode focus_mode = META_FOCUS_MODE_CLICK;
static MetaFocusNewWindows focus_new_windows = META_FOCUS_NEW_WINDOWS_SMART;
static gboolean raise_on_click = TRUE;
+static gboolean attach_modal_dialogs = FALSE;
static char* current_theme = NULL;
static int num_workspaces = 4;
static MetaWrapStyle wrap_style = META_WRAP_NONE;
@@ -334,6 +335,12 @@ static MetaEnumPreference preferences_enum[] =
static MetaBoolPreference preferences_bool[] =
{
+ { "attach-modal-dialogs",
+ KEY_GENERAL_SCHEMA,
+ META_PREF_ATTACH_MODAL_DIALOGS,
+ &attach_modal_dialogs,
+ TRUE,
+ },
{ "raise-on-click",
KEY_GENERAL_SCHEMA,
META_PREF_RAISE_ON_CLICK,
@@ -1075,6 +1082,12 @@ meta_prefs_get_focus_new_windows (void)
}
gboolean
+meta_prefs_get_attach_modal_dialogs (void)
+{
+ return attach_modal_dialogs;
+}
+
+gboolean
meta_prefs_get_raise_on_click (void)
{
/* Force raise_on_click on for click-to-focus, as requested by Havoc
@@ -1536,6 +1549,9 @@ meta_preference_to_string (MetaPreference pref)
case META_PREF_FOCUS_NEW_WINDOWS:
return "FOCUS_NEW_WINDOWS";
+ case META_PREF_ATTACH_MODAL_DIALOGS:
+ return "ATTACH_MODAL_DIALOGS";
+
case META_PREF_RAISE_ON_CLICK:
return "RAISE_ON_CLICK";