From aaa378feaff4331c8c78afb390f99d867ddf9b88 Mon Sep 17 00:00:00 2001 From: Denis Gorodnichev Date: Sun, 6 Jul 2014 17:03:50 +0400 Subject: don't change use settings by command line argument --- src/core/main.c | 2 +- src/core/prefs.c | 14 ++++++++------ src/include/prefs.h | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/core/main.c b/src/core/main.c index 39405127..66a5cdfb 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -574,7 +574,7 @@ main (int argc, char **argv) g_free (meta_args.client_id); if (meta_args.composite || meta_args.no_composite) - meta_prefs_set_compositing_manager (meta_args.composite); + meta_prefs_set_force_compositing_manager (meta_args.composite); if (meta_args.no_force_fullscreen) meta_prefs_set_force_fullscreen (FALSE); diff --git a/src/core/prefs.c b/src/core/prefs.c index cd40a2ce..8847614e 100644 --- a/src/core/prefs.c +++ b/src/core/prefs.c @@ -112,6 +112,8 @@ static gboolean mate_accessibility = FALSE; static gboolean mate_animations = TRUE; static char *cursor_theme = NULL; static int cursor_size = 24; +static gboolean use_force_compositor_manager = FALSE; +static gboolean force_compositor_manager = FALSE; static gboolean compositing_manager = FALSE; static gboolean compositing_fast_alt_tab = FALSE; static gboolean resize_with_right_button = FALSE; @@ -378,7 +380,7 @@ static MetaBoolPreference preferences_bool[] = &mate_animations, TRUE, }, - { "compositing-manager", + { KEY_GENERAL_COMPOSITOR, KEY_GENERAL_SCHEMA, META_PREF_COMPOSITING_MANAGER, &compositing_manager, @@ -2193,6 +2195,8 @@ meta_prefs_get_window_binding (const char *name, gboolean meta_prefs_get_compositing_manager (void) { + if (use_force_compositor_manager) + return force_compositor_manager; return compositing_manager; } @@ -2233,12 +2237,10 @@ meta_prefs_get_force_fullscreen (void) } void -meta_prefs_set_compositing_manager (gboolean whether) +meta_prefs_set_force_compositing_manager (gboolean whether) { - g_settings_set_boolean (settings_general, - KEY_GENERAL_COMPOSITOR, - whether); - + use_force_compositor_manager = TRUE; + force_compositor_manager = whether; } void diff --git a/src/include/prefs.h b/src/include/prefs.h index 183cb6e8..d804207c 100644 --- a/src/include/prefs.h +++ b/src/include/prefs.h @@ -130,7 +130,7 @@ gboolean meta_prefs_get_force_fullscreen (void); * * \param whether TRUE to turn on, FALSE to turn off */ -void meta_prefs_set_compositing_manager (gboolean whether); +void meta_prefs_set_force_compositing_manager (gboolean whether); void meta_prefs_set_compositing_fast_alt_tab (gboolean whether); -- cgit v1.2.1