Binary files metacity-2.14.3/src/.tags and metacity-2.14.3-patched/src/.tags differ
diff -r -u metacity-2.14.3/src/metacity.schemas.in metacity-2.14.3-patched/src/metacity.schemas.in
--- metacity-2.14.3/src/metacity.schemas.in	2006-05-20 18:06:14.000000000 +0100
+++ metacity-2.14.3-patched/src/metacity.schemas.in	2006-04-13 19:32:00.000000000 +0100
@@ -108,22 +108,6 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/metacity/general/raise_on_activate</key>
-      <applyto>/apps/metacity/general/raise_on_activate</applyto>
-      <owner>metacity</owner>
-      <type>bool</type>
-      <default>true</default>
-      <locale name="C">
-         <short>Whether raising should be a side-effect of activating it</short>
-         <long>
-           Setting this option to true can be used when raise_on_click is
-           false, but you still want windows to be raised when activated.
-           A window may be activated by clicking on its button in the Window list.
-         </long>
-      </locale>
-    </schema>
-
-    <schema>
       <key>/schemas/apps/metacity/general/action_double_click_titlebar</key>
       <applyto>/apps/metacity/general/action_double_click_titlebar</applyto>
       <owner>metacity</owner>
diff -r -u metacity-2.14.3/src/prefs.c metacity-2.14.3-patched/src/prefs.c
--- metacity-2.14.3/src/prefs.c	2006-04-13 19:32:00.000000000 +0100
+++ metacity-2.14.3-patched/src/prefs.c	2006-05-20 17:54:07.000000000 +0100
@@ -44,6 +44,7 @@
 #define KEY_FOCUS_MODE "/apps/metacity/general/focus_mode"
 #define KEY_FOCUS_NEW_WINDOWS "/apps/metacity/general/focus_new_windows"
 #define KEY_RAISE_ON_CLICK "/apps/metacity/general/raise_on_click"
+#define KEY_RAISE_ON_ACTIVATE "/apps/metacity/general/raise_on_activate"
 #define KEY_ACTION_DOUBLE_CLICK_TITLEBAR "/apps/metacity/general/action_double_click_titlebar"
 #define KEY_AUTO_RAISE "/apps/metacity/general/auto_raise"
 #define KEY_AUTO_RAISE_DELAY "/apps/metacity/general/auto_raise_delay"
@@ -85,6 +86,7 @@
 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 raise_on_activate = TRUE;
 static char* current_theme = NULL;
 static int num_workspaces = 4;
 static MetaActionDoubleClickTitlebar action_double_click_titlebar =
@@ -130,6 +132,7 @@
 static gboolean update_focus_mode         (const char *value);
 static gboolean update_focus_new_windows  (const char *value);
 static gboolean update_raise_on_click     (gboolean    value);
+static gboolean update_raise_on_activate  (gboolean    value);
 static gboolean update_theme              (const char *value);
 static gboolean update_visual_bell        (gboolean v1, gboolean v2);
 static gboolean update_visual_bell_type   (const char *value);
@@ -387,6 +390,9 @@
   if (get_bool (KEY_RAISE_ON_CLICK, &bool_val))
     update_raise_on_click (bool_val);
   
+  if (get_bool (KEY_RAISE_ON_ACTIVATE, &bool_val))
+    update_raise_on_activate (bool_val);
+  
   str_val = gconf_client_get_string (default_client,
                                      KEY_ACTION_DOUBLE_CLICK_TITLEBAR,
 				     &err);
@@ -604,6 +610,22 @@
       if (update_raise_on_click (b))
         queue_changed (META_PREF_RAISE_ON_CLICK);
     }
+  else if (strcmp (key, KEY_RAISE_ON_ACTIVATE) == 0)
+    {
+      gboolean b;
+
+      if (value && value->type != GCONF_VALUE_BOOL)
+        {
+          meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
+                        KEY_RAISE_ON_ACTIVATE);
+          goto out;
+        }
+
+      b = value ? gconf_value_get_bool (value) : TRUE;
+      
+      if (update_raise_on_activate (b))
+        queue_changed (META_PREF_RAISE_ON_ACTIVATE);
+    }
   else if (strcmp (key, KEY_THEME) == 0)
     {
       const char *str;
@@ -1060,6 +1082,18 @@
 
 #ifdef HAVE_GCONF
 static gboolean
+update_raise_on_activate (gboolean value)
+{
+  gboolean old = raise_on_activate;
+
+  raise_on_activate = value;
+
+  return old != value;
+}
+#endif /* HAVE_GCONF */
+
+#ifdef HAVE_GCONF
+static gboolean
 update_theme (const char *value)
 {
   char *old_theme;
@@ -1116,7 +1150,13 @@
   /* Force raise_on_click on for click-to-focus, as requested by Havoc
    * in #326156.
    */
-  return raise_on_click || focus_mode == META_FOCUS_MODE_CLICK;
+  return raise_on_click;
+}
+
+gboolean
+meta_prefs_get_raise_on_activate (void)
+{
+  return raise_on_activate;
 }
 
 const char*
@@ -1611,6 +1651,9 @@
     case META_PREF_RAISE_ON_CLICK:
       return "RAISE_ON_CLICK";
       
+    case META_PREF_RAISE_ON_ACTIVATE:
+      return "RAISE_ON_ACTIVATE";
+      
     case META_PREF_THEME:
       return "THEME";
 
diff -r -u metacity-2.14.3/src/prefs.h metacity-2.14.3-patched/src/prefs.h
--- metacity-2.14.3/src/prefs.h	2006-04-13 19:32:00.000000000 +0100
+++ metacity-2.14.3-patched/src/prefs.h	2006-05-20 17:53:26.000000000 +0100
@@ -33,6 +33,7 @@
   META_PREF_FOCUS_MODE,
   META_PREF_FOCUS_NEW_WINDOWS,
   META_PREF_RAISE_ON_CLICK,
+  META_PREF_RAISE_ON_ACTIVATE,
   META_PREF_ACTION_DOUBLE_CLICK_TITLEBAR,
   META_PREF_AUTO_RAISE,
   META_PREF_AUTO_RAISE_DELAY,
@@ -71,6 +72,7 @@
 MetaFocusMode               meta_prefs_get_focus_mode         (void);
 MetaFocusNewWindows         meta_prefs_get_focus_new_windows  (void);
 gboolean                    meta_prefs_get_raise_on_click     (void);
+gboolean                    meta_prefs_get_raise_on_activate  (void);
 const char*                 meta_prefs_get_theme              (void);
 /* returns NULL if GTK default should be used */
 const PangoFontDescription* meta_prefs_get_titlebar_font      (void);
diff -r -u metacity-2.14.3/src/window.c metacity-2.14.3-patched/src/window.c
--- metacity-2.14.3/src/window.c	2006-04-13 19:32:00.000000000 +0100
+++ metacity-2.14.3-patched/src/window.c	2006-05-20 17:52:04.000000000 +0100
@@ -2510,7 +2510,8 @@
 
   unminimize_window_and_all_transient_parents (window);
 
-  if (meta_prefs_get_raise_on_click () ||
+  if (meta_prefs_get_raise_on_activate () ||
+      meta_prefs_get_raise_on_click () ||
       source_indication == META_CLIENT_TYPE_PAGER)
     meta_window_raise (window);
 

