[mutter] Remove option to turn compositing off



commit 48b9807c86d520b4b007dd0a438f3c5d72a9a477
Author: Nickolas Lloyd <ultrageek lloyd gmail com>
Date:   Tue Aug 17 10:41:18 2010 +0000

    Remove option to turn compositing off
    
    This patch removes the ability to disable compositing in mutter.  As
    clutter compositing was the reason for the fork from metacity, turning
    compositing off does not make sense.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=626875

 src/core/display.c  |   32 +-------------------------------
 src/core/main.c     |   15 ---------------
 src/core/prefs.c    |   38 --------------------------------------
 src/include/prefs.h |    1 -
 4 files changed, 1 insertions(+), 85 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 4b8befb..e3de963 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -388,26 +388,6 @@ enable_compositor (MetaDisplay *display,
 }
 
 static void
-disable_compositor (MetaDisplay *display)
-{
-  GSList *list;
-  
-  if (!display->compositor)
-    return;
-  
-  for (list = display->screens; list != NULL; list = list->next)
-    {
-      MetaScreen *screen = list->data;
-      
-      meta_compositor_unmanage_screen (screen->display->compositor,
-				       screen);
-    }
-  
-  meta_compositor_destroy (display->compositor);
-  display->compositor = NULL;
-}
-
-static void
 meta_display_init (MetaDisplay *disp)
 {
   /* Some stuff could go in here that's currently in _open,
@@ -839,8 +819,7 @@ meta_display_open (void)
   /* We don't composite the windows here because they will be composited 
      faster with the call to meta_screen_manage_all_windows further down 
      the code */
-  if (1) /* meta_prefs_get_compositing_manager ()) FIXME */
-    enable_compositor (the_display, FALSE);
+  enable_compositor (the_display, FALSE);
    
   meta_display_grab (the_display);
   
@@ -5188,15 +5167,6 @@ prefs_changed_callback (MetaPreference pref,
     {
       meta_bell_set_audible (display, meta_prefs_bell_is_audible ());
     }
-  else if (pref == META_PREF_COMPOSITING_MANAGER)
-    {
-      gboolean cm = meta_prefs_get_compositing_manager ();
-
-      if (cm)
-        enable_compositor (display, TRUE);
-      else
-	disable_compositor (display);
-    }
   else if (pref == META_PREF_ATTACH_MODAL_DIALOGS)
     {
       MetaDisplay *display = data;
diff --git a/src/core/main.c b/src/core/main.c
index 0a4d06d..9efb549 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -297,18 +297,6 @@ meta_parse_options (int *argc, char ***argv,
       NULL
     },
     {
-      "composite", 'c', COMPOSITE_OPTS_FLAGS, G_OPTION_ARG_NONE,
-      &my_args.composite,
-      N_("Turn compositing on"),
-      NULL
-    },
-    {
-      "no-composite", 0, COMPOSITE_OPTS_FLAGS, G_OPTION_ARG_NONE,
-      &my_args.no_composite,
-      N_("Turn compositing off"),
-      NULL
-    },
-    {
       "no-force-fullscreen", 0, COMPOSITE_OPTS_FLAGS, G_OPTION_ARG_NONE,
       &my_args.no_force_fullscreen,
       N_("Don't make fullscreen windows that are maximized and have no decorations"),
@@ -705,9 +693,6 @@ main (int argc, char **argv)
   g_free (meta_args.display_name);
   g_free (meta_args.client_id);
 
-  if (meta_args.composite || meta_args.no_composite)
-    meta_prefs_set_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 d4c7320..6f050e6 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -50,7 +50,6 @@
  */
 #define KEY_TITLEBAR_FONT "/apps/metacity/general/titlebar_font"
 #define KEY_NUM_WORKSPACES "/apps/metacity/general/num_workspaces"
-#define KEY_COMPOSITOR "/apps/metacity/general/compositing_manager"
 #define KEY_GNOME_ACCESSIBILITY "/desktop/gnome/interface/accessibility"
 
 #define KEY_COMMAND_DIRECTORY "/apps/metacity/keybinding_commands"
@@ -102,7 +101,6 @@ static gboolean gnome_accessibility = FALSE;
 static gboolean gnome_animations = TRUE;
 static char *cursor_theme = NULL;
 static int   cursor_size = 24;
-static gboolean compositing_manager = FALSE;
 static gboolean resize_with_right_button = FALSE;
 static gboolean edge_tiling = FALSE;
 static gboolean force_fullscreen = TRUE;
@@ -413,11 +411,6 @@ static MetaBoolPreference preferences_bool[] =
       &gnome_animations,
       TRUE,
     },
-    { "/apps/metacity/general/compositing_manager",
-      META_PREF_COMPOSITING_MANAGER,
-      &compositing_manager,
-      FALSE,
-    },
     { "/apps/metacity/general/resize_with_right_button",
       META_PREF_RESIZE_WITH_RIGHT_BUTTON,
       &resize_with_right_button,
@@ -2004,9 +1997,6 @@ meta_preference_to_string (MetaPreference pref)
     case META_PREF_CURSOR_SIZE:
       return "CURSOR_SIZE";
 
-    case META_PREF_COMPOSITING_MANAGER:
-      return "COMPOSITING_MANAGER";
-
     case META_PREF_RESIZE_WITH_RIGHT_BUTTON:
       return "RESIZE_WITH_RIGHT_BUTTON";
 
@@ -2992,12 +2982,6 @@ meta_prefs_get_window_binding (const char          *name,
   g_assert_not_reached ();
 }
 
-gboolean
-meta_prefs_get_compositing_manager (void)
-{
-  return compositing_manager;
-}
-
 guint
 meta_prefs_get_mouse_button_resize (void)
 {
@@ -3016,28 +3000,6 @@ meta_prefs_get_force_fullscreen (void)
   return force_fullscreen;
 }
 
-void
-meta_prefs_set_compositing_manager (gboolean whether)
-{
-#ifdef HAVE_GCONF
-  GError *err = NULL;
-
-  gconf_client_set_bool (default_client,
-                         KEY_COMPOSITOR,
-                         whether,
-                         &err);
-
-  if (err)
-    {
-      meta_warning (_("Error setting compositor status: %s\n"),
-                    err->message);
-      g_error_free (err);
-    }
-#else
-  compositing_manager = whether;
-#endif
-}
-
 /**
  * meta_prefs_get_clutter_plugins:
  *
diff --git a/src/include/prefs.h b/src/include/prefs.h
index 9d66812..1c60aac 100644
--- a/src/include/prefs.h
+++ b/src/include/prefs.h
@@ -58,7 +58,6 @@ typedef enum
   META_PREF_GNOME_ANIMATIONS,
   META_PREF_CURSOR_THEME,
   META_PREF_CURSOR_SIZE,
-  META_PREF_COMPOSITING_MANAGER,
   META_PREF_RESIZE_WITH_RIGHT_BUTTON,
   META_PREF_EDGE_TILING,
   META_PREF_FORCE_FULLSCREEN,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]