Index: src/common.h
===================================================================
RCS file: /cvs/gnome/metacity/src/common.h,v
retrieving revision 1.26
diff -u -u -r1.26 common.h
--- src/common.h	9 Aug 2002 04:27:22 -0000	1.26
+++ src/common.h	29 Aug 2002 21:04:34 -0000
@@ -143,6 +143,15 @@
 
 typedef enum
 {
+  META_ANIMATION_DRAW_ROOT,
+  META_ANIMATION_WINDOW_WIREFRAME,
+  META_ANIMATION_WINDOW_OPAQUE,
+  META_ANIMATION_NONE
+
+} MetaAnimationStyle;
+
+typedef enum
+{
   META_FRAME_TYPE_NORMAL,
   META_FRAME_TYPE_DIALOG,
   META_FRAME_TYPE_MODAL_DIALOG,
Index: src/effects.c
===================================================================
RCS file: /cvs/gnome/metacity/src/effects.c,v
retrieving revision 1.11
diff -u -u -r1.11 effects.c
--- src/effects.c	6 Aug 2002 04:11:23 -0000	1.11
+++ src/effects.c	29 Aug 2002 21:04:35 -0000
@@ -28,14 +28,6 @@
 #include <X11/extensions/shape.h>
 #endif
 
-typedef enum
-{
-  META_ANIMATION_DRAW_ROOT,
-  META_ANIMATION_WINDOW_WIREFRAME,
-  META_ANIMATION_WINDOW_OPAQUE
-
-} MetaAnimationStyle;
-
 typedef struct
 {
   MetaScreen *screen;
@@ -280,8 +272,6 @@
  * and unmapping of windows that's going on.
  */
  
-static MetaAnimationStyle animation_style = META_ANIMATION_WINDOW_WIREFRAME;
-
 void
 meta_effects_draw_box_animation (MetaScreen     *screen,
                                  MetaRectangle  *initial_rect,
@@ -307,7 +297,7 @@
   context->end_rect = *destination_rect;
   context->anim_type = anim_type;
 
-  context->style = animation_style;
+  context->style = meta_prefs_get_animation_style();
 
 #ifndef HAVE_SHAPE
   if (context->style == META_ANIMATION_WINDOW_WIREFRAME)
Index: src/metacity.schemas.in
===================================================================
RCS file: /cvs/gnome/metacity/src/metacity.schemas.in,v
retrieving revision 1.10
diff -u -u -r1.10 metacity.schemas.in
--- src/metacity.schemas.in	21 Aug 2002 06:47:16 -0000	1.10
+++ src/metacity.schemas.in	29 Aug 2002 21:04:36 -0000
@@ -1445,6 +1445,25 @@
       </locale>
     </schema>
 
+    <schema>
+      <key>/schemas/apps/metacity/general/animation_style</key>
+      <applyto>/apps/metacity/general/animation_style</applyto>
+      <owner>metacity</owner>
+      <type>string</type>
+      <default>wireframe</default>
+      <locale name="C">
+        <short>Specify the Animation Style for Window Animations</short>
+        <long>
+	  There are a number of places where Metacity might create a simple
+	  animation of an operation.  These animations can make clearer 
+	  what is happening.  At the moment, there are animations for 
+	  window shading a window and minimizing a window.  The options
+	  are: thin, wireframe, opaque, and none.
+        </long>
+
+      </locale>
+    </schema>
+
 
   </schemalist>  
 </gconfschemafile>
Index: src/prefs.c
===================================================================
RCS file: /cvs/gnome/metacity/src/prefs.c,v
retrieving revision 1.22
diff -u -u -r1.22 prefs.c
--- src/prefs.c	21 Aug 2002 06:47:16 -0000	1.22
+++ src/prefs.c	29 Aug 2002 21:04:37 -0000
@@ -39,6 +39,7 @@
 #define KEY_NUM_WORKSPACES "/apps/metacity/general/num_workspaces"
 #define KEY_APPLICATION_BASED "/apps/metacity/general/application_based"
 #define KEY_DISABLE_WORKAROUNDS "/apps/metacity/general/disable_workarounds"
+#define KEY_ANIMATION_STYLE "/apps/metacity/general/animation_style"
 
 #define KEY_COMMAND_PREFIX "/apps/metacity/keybinding_commands/command_"
 #define KEY_SCREEN_BINDINGS_PREFIX "/apps/metacity/global_keybindings"
@@ -55,6 +56,7 @@
 static int num_workspaces = 4;
 static gboolean application_based = FALSE;
 static gboolean disable_workarounds = FALSE;
+static MetaAnimationStyle animation_style = META_ANIMATION_WINDOW_WIREFRAME;
 static gboolean auto_raise = FALSE;
 static gboolean auto_raise_delay = 500;
 #define NUM_COMMANDS 12
@@ -65,6 +67,7 @@
 static gboolean update_titlebar_font      (const char *value);
 static gboolean update_focus_mode         (const char *value);
 static gboolean update_theme              (const char *value);
+static gboolean update_animation_style    (const char *value);
 static gboolean update_num_workspaces     (int         value);
 static gboolean update_application_based  (gboolean    value);
 static gboolean update_disable_workarounds (gboolean   value);
@@ -259,6 +262,12 @@
   update_theme (str_val);
   g_free (str_val);
   
+  str_val = gconf_client_get_string (default_client, KEY_ANIMATION_STYLE,
+				     &err);
+  cleanup_error (&err);
+  update_animation_style (str_val);
+  g_free (str_val);
+
   /* If the keys aren't set in the database, we use essentially
    * bogus values instead of any kind of default. This is
    * just lazy. But they keys ought to be set, anyhow.
@@ -369,6 +378,22 @@
       if (update_theme (str))
         queue_changed (META_PREF_THEME);
     }
+  else if (strcmp (key, KEY_ANIMATION_STYLE) == 0)
+    {
+      const char *str;
+
+      if (value && value->type != GCONF_VALUE_STRING)
+	{
+	  meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
+			KEY_ANIMATION_STYLE);
+	  goto out;
+	}
+
+      str = value ? gconf_value_get_string (value) : NULL;
+      
+      if (update_animation_style (str))
+	queue_changed (META_PREF_ANIMATION_STYLE);
+    }
   else if (strcmp (key, KEY_TITLEBAR_FONT) == 0)
     {
       const char *str;
@@ -567,6 +592,29 @@
 }
 
 static gboolean
+update_animation_style (const char *value)
+{
+  MetaAnimationStyle old_style = animation_style;
+
+  if (value != NULL)
+    {
+      if (g_ascii_strcasecmp (value, "thin") == 0)
+	animation_style = META_ANIMATION_DRAW_ROOT;
+      else if (g_ascii_strcasecmp (value, "wireframe") == 0)
+	animation_style = META_ANIMATION_WINDOW_WIREFRAME;
+      else if (g_ascii_strcasecmp (value, "opaque") == 0)
+	animation_style = META_ANIMATION_WINDOW_OPAQUE;
+      else if (g_ascii_strcasecmp (value, "none") == 0)
+	animation_style = META_ANIMATION_NONE;
+      else
+	meta_warning (_("GConf key '%s' is set to an invalid value"),
+		      KEY_ANIMATION_STYLE);
+    }
+
+  return (old_style != animation_style);
+}
+
+static gboolean
 update_theme (const char *value)
 {
   char *old_theme;
@@ -610,6 +658,12 @@
   return current_theme;
 }
 
+MetaAnimationStyle
+meta_prefs_get_animation_style (void)
+{
+  return animation_style;
+}
+
 static gboolean
 update_use_system_font (gboolean value)
 {
@@ -772,6 +826,9 @@
 
     case META_PREF_THEME:
       return "THEME";
+
+    case META_PREF_ANIMATION_STYLE:
+      return "ANIMATION_STYLE";
 
     case META_PREF_TITLEBAR_FONT:
       return "TITLEBAR_FONT";
Index: src/prefs.h
===================================================================
RCS file: /cvs/gnome/metacity/src/prefs.h,v
retrieving revision 1.18
diff -u -u -r1.18 prefs.h
--- src/prefs.h	21 Aug 2002 06:47:16 -0000	1.18
+++ src/prefs.h	29 Aug 2002 21:04:37 -0000
@@ -31,6 +31,7 @@
   META_PREF_FOCUS_MODE,
   META_PREF_AUTO_RAISE,
   META_PREF_AUTO_RAISE_DELAY,
+  META_PREF_ANIMATION_STYLE,
   META_PREF_THEME,
   META_PREF_TITLEBAR_FONT,
   META_PREF_NUM_WORKSPACES,
@@ -53,6 +54,7 @@
 const char* meta_preference_to_string (MetaPreference pref);
 
 MetaFocusMode               meta_prefs_get_focus_mode         (void);
+MetaAnimationStyle          meta_prefs_get_animation_style    (void);
 const char*                 meta_prefs_get_theme              (void);
 /* returns NULL if GTK default should be used */
 const PangoFontDescription* meta_prefs_get_titlebar_font      (void);
