Index: src/include/ui.h
===================================================================
--- src/include/ui.h	(revision 4058)
+++ src/include/ui.h	(working copy)
@@ -204,6 +204,8 @@
 
 GdkPixbuf *meta_ui_get_pixbuf_from_pixmap (Pixmap   pmap);
 
+void meta_ui_set_window_border_width (gint width);
+
 #include "tabpopup.h"
 
 #endif
Index: src/include/prefs.h
===================================================================
--- src/include/prefs.h	(revision 4058)
+++ src/include/prefs.h	(working copy)
@@ -40,6 +40,7 @@
   META_PREF_ACTION_RIGHT_CLICK_TITLEBAR,
   META_PREF_AUTO_RAISE,
   META_PREF_AUTO_RAISE_DELAY,
+  META_PREF_BORDER_WIDTH,
   META_PREF_THEME,
   META_PREF_TITLEBAR_FONT,
   META_PREF_NUM_WORKSPACES,
@@ -84,6 +85,7 @@
 gboolean                    meta_prefs_get_disable_workarounds (void);
 gboolean                    meta_prefs_get_auto_raise         (void);
 int                         meta_prefs_get_auto_raise_delay   (void);
+int                         meta_prefs_get_border_width       (void);
 gboolean                    meta_prefs_get_reduced_resources  (void);
 gboolean                    meta_prefs_get_gnome_accessibility (void);
 gboolean                    meta_prefs_get_gnome_animations   (void);
Index: src/core/prefs.c
===================================================================
--- src/core/prefs.c	(revision 4058)
+++ src/core/prefs.c	(working copy)
@@ -86,6 +86,7 @@
 static gboolean disable_workarounds = FALSE;
 static gboolean auto_raise = FALSE;
 static gboolean auto_raise_delay = 500;
+static gboolean border_width = 0;
 static gboolean provide_visual_bell = FALSE;
 static gboolean bell_is_audible = TRUE;
 static gboolean reduced_resources = FALSE;
@@ -458,6 +459,11 @@
       0, 10000, 0,
       /* @@@ Get rid of MAX_REASONABLE_AUTO_RAISE_DELAY */
     },
+    { "/apps/metacity/general/border_width",
+      META_PREF_BORDER_WIDTH,
+      &border_width,
+      0, 100, 0,
+    },
     { "/desktop/gnome/peripherals/mouse/cursor_size",
       META_PREF_CURSOR_SIZE,
       &cursor_size,
@@ -1702,6 +1708,9 @@
     case META_PREF_AUTO_RAISE_DELAY:
       return "AUTO_RAISE_DELAY";
 
+    case META_PREF_BORDER_WIDTH:
+      return "BORDER_WIDTH";
+
     case META_PREF_COMMANDS:
       return "COMMANDS";
 
@@ -2629,6 +2638,12 @@
   return auto_raise_delay;
 }
 
+int
+meta_prefs_get_border_width (void)
+{
+  return border_width;
+}
+
 gboolean
 meta_prefs_get_reduced_resources (void)
 {
Index: src/core/main.c
===================================================================
--- src/core/main.c	(revision 4058)
+++ src/core/main.c	(working copy)
@@ -52,6 +52,7 @@
 #include "ui.h"
 #include "session.h"
 #include "prefs.h"
+#include "frame.h"
 
 #include <glib-object.h>
 
@@ -600,6 +601,10 @@
 {
   switch (pref)
     {
+    case META_PREF_BORDER_WIDTH:
+      meta_ui_set_window_border_width (meta_prefs_get_border_width ());
+      /* FALLTHROUGH */
+
     case META_PREF_THEME:
       meta_ui_set_current_theme (meta_prefs_get_theme (), FALSE);
       meta_display_retheme_all ();
Index: src/metacity.schemas.in.in
===================================================================
--- src/metacity.schemas.in.in	(revision 4058)
+++ src/metacity.schemas.in.in	(working copy)
@@ -467,6 +467,22 @@
       </locale>
     </schema>
 
+    <schema>
+      <key>/schemas/apps/metacity/general/border_width</key>
+      <applyto>/apps/metacity/general/border_width</applyto>      
+      <owner>metacity</owner>
+      <type>int</type>
+      <default>false</default>
+      <locale name="C">
+        <short>Width of the border</short>
+        <long> 
+	  Set to a positive value to change the width of
+          the window border in all themes.  Set to zero
+          to keep the width given by the theme.
+        </long>
+      </locale>
+    </schema>
+
     <!-- Schemas below are generated by schema-bindings.c when this file
          becomes metacity.schemas.in     
     -->
Index: src/ui/theme.c
===================================================================
--- src/ui/theme.c	(revision 4058)
+++ src/ui/theme.c	(working copy)
@@ -57,6 +57,7 @@
 #include "theme-parser.h"
 #include "util.h"
 #include "gradient.h"
+#include "frame.h"
 #include <gtk/gtk.h>
 #include <string.h>
 #include <stdlib.h>
@@ -94,6 +95,11 @@
  */
 static MetaTheme *meta_current_theme = NULL;
 
+/**
+ * The minimum width of a window border.
+ */
+static int window_border_width = 0;
+
 static GdkPixbuf *
 colorize_pixbuf (GdkPixbuf *orig,
                  GdkColor  *new_color)
@@ -408,7 +414,7 @@
                                int                   *right_width)
 {
   int buttons_height, title_height;
-  
+
   g_return_if_fail (top_height != NULL);
   g_return_if_fail (bottom_height != NULL);
   g_return_if_fail (left_width != NULL);
@@ -425,20 +431,21 @@
 
   if (top_height)
     {
-      *top_height = MAX (buttons_height, title_height);
+      *top_height = MAX (MAX (buttons_height, title_height),
+                         window_border_width);
     }
 
   if (left_width)
-    *left_width = layout->left_width;
+    *left_width = MAX (window_border_width, layout->left_width);
   if (right_width)
-    *right_width = layout->right_width;
+    *right_width = MAX (window_border_width, layout->right_width);
 
   if (bottom_height)
     {
       if (flags & META_FRAME_SHADED)
         *bottom_height = 0;
       else
-        *bottom_height = layout->bottom_height;
+        *bottom_height = MAX (window_border_width, layout->bottom_height);
     }
 
   if (flags & META_FRAME_FULLSCREEN)
@@ -4683,6 +4690,12 @@
 }
 
 void
+meta_theme_set_window_border_width (int width)
+{
+  window_border_width = width;
+}
+
+void
 meta_theme_set_current (const char *name,
                         gboolean    force_reload)
 {
Index: src/ui/theme.h
===================================================================
--- src/ui/theme.h	(revision 4058)
+++ src/ui/theme.h	(working copy)
@@ -1105,7 +1105,6 @@
 
 guint meta_theme_earliest_version_with_button (MetaButtonType type);
 
-
 #define META_THEME_ALLOWS(theme, feature) (theme->format_version >= feature)
 
 /* What version of the theme file format were various features introduced in? */
@@ -1119,4 +1118,6 @@
 #define META_THEME_COLOR_CONSTANTS 2
 #define META_THEME_FRAME_BACKGROUNDS 2
 
+void meta_theme_set_window_border_width (int width);
+
 #endif
Index: src/ui/ui.c
===================================================================
--- src/ui/ui.c	(revision 4058)
+++ src/ui/ui.c	(working copy)
@@ -997,3 +997,9 @@
 
   return pixbuf;
 }
+
+void
+meta_ui_set_window_border_width (gint width)
+{
+  meta_theme_set_window_border_width (width);
+}
