diff --git a/src/core/main.c b/src/core/main.c index b5c8e0940..2c00e8b99 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -594,6 +594,7 @@ prefs_changed_callback (MetaPreference pref, switch (pref) { case META_PREF_THEME: + case META_PREF_DRAGGABLE_BORDER_WIDTH: meta_ui_set_current_theme (meta_prefs_get_theme (), FALSE); meta_display_retheme_all (); break; diff --git a/src/core/prefs.c b/src/core/prefs.c index 2faf130f8..328c17de6 100644 --- a/src/core/prefs.c +++ b/src/core/prefs.c @@ -68,6 +68,7 @@ #define KEY_LIVE_HIDDEN_WINDOWS "/apps/mutter/general/live_hidden_windows" #define KEY_WORKSPACES_ONLY_ON_PRIMARY "/apps/mutter/general/workspaces_only_on_primary" +#define KEY_DRAGGABLE_BORDER_WIDTH "/apps/mutter/general/draggable_border_width" #define KEY_NO_TAB_POPUP "/apps/metacity/general/no_tab_popup" @@ -100,6 +101,7 @@ static gboolean gnome_accessibility = FALSE; static gboolean gnome_animations = TRUE; static char *cursor_theme = NULL; static int cursor_size = 24; +static int draggable_border_width = 10; static gboolean resize_with_right_button = FALSE; static gboolean edge_tiling = FALSE; static gboolean force_fullscreen = TRUE; @@ -493,6 +495,11 @@ static MetaIntPreference preferences_int[] = &cursor_size, 1, 128, 24, }, + { "/apps/mutter/general/draggable_border_width", + META_PREF_DRAGGABLE_BORDER_WIDTH, + &draggable_border_width, + 0, 64, 10, + }, { NULL, 0, NULL, 0, 0, 0, }, }; @@ -1987,6 +1994,9 @@ meta_preference_to_string (MetaPreference pref) case META_PREF_NO_TAB_POPUP: return "NO_TAB_POPUP"; + + case META_PREF_DRAGGABLE_BORDER_WIDTH: + return "DRAGGABLE_BORDER_WIDTH"; } return "(unknown)"; @@ -3040,6 +3050,12 @@ meta_prefs_set_no_tab_popup (gboolean whether) #endif } +int +meta_prefs_get_draggable_border_width (void) +{ + return draggable_border_width; +} + #ifndef HAVE_GCONF static void init_button_layout(void) diff --git a/src/meta/prefs.h b/src/meta/prefs.h index 8be7dcfd1..31256d4d2 100644 --- a/src/meta/prefs.h +++ b/src/meta/prefs.h @@ -63,7 +63,8 @@ typedef enum META_PREF_FORCE_FULLSCREEN, META_PREF_LIVE_HIDDEN_WINDOWS, META_PREF_WORKSPACES_ONLY_ON_PRIMARY, - META_PREF_NO_TAB_POPUP + META_PREF_NO_TAB_POPUP, + META_PREF_DRAGGABLE_BORDER_WIDTH } MetaPreference; typedef void (* MetaPrefsChangedFunc) (MetaPreference pref, @@ -142,6 +143,8 @@ gboolean meta_prefs_get_workspaces_only_on_primary (void); gboolean meta_prefs_get_no_tab_popup (void); void meta_prefs_set_no_tab_popup (gboolean whether); +int meta_prefs_get_draggable_border_width (void); + /* XXX FIXME This should be x-macroed, but isn't yet because it would be * difficult (or perhaps impossible) to add the suffixes using the current * system. It needs some more thought, perhaps after the current system diff --git a/src/mutter.schemas.in b/src/mutter.schemas.in index 40973e0f5..46acc5209 100644 --- a/src/mutter.schemas.in +++ b/src/mutter.schemas.in @@ -68,5 +68,22 @@ + + + /schemas/apps/mutter/general/draggable_border_width + /apps/mutter/general/draggable_border_width + mutter + int + 10 + + Draggable border width + + The amount of total draggable borders. If the theme's visible + borders are not enough, invisible borders will be added to meet + this value. + + + +