summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/prefs.c17
-rw-r--r--src/core/screen.c10
-rw-r--r--src/core/window.c5
3 files changed, 27 insertions, 5 deletions
diff --git a/src/core/prefs.c b/src/core/prefs.c
index 81ce07b9..7e4db4e9 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -52,6 +52,7 @@
#define KEY_GENERAL_COMPOSITOR "compositing-manager"
#define KEY_GENERAL_COMPOSITOR_FAST_ALT_TAB "compositing-fast-alt-tab"
#define KEY_GENERAL_CENTER_NEW_WINDOWS "center-new-windows"
+#define KEY_GENERAL_ICON_SIZE "icon-size"
#define KEY_COMMAND_SCHEMA "org.mate.Marco.keybinding-commands"
#define KEY_COMMAND_PREFIX "command-"
@@ -114,6 +115,7 @@ static gboolean mate_accessibility = FALSE;
static gboolean mate_animations = TRUE;
static char *cursor_theme = NULL;
static int cursor_size = 24;
+static int icon_size = META_DEFAULT_ICON_SIZE;
static gboolean use_force_compositor_manager = FALSE;
static gboolean force_compositor_manager = FALSE;
static gboolean compositing_manager = FALSE;
@@ -512,6 +514,12 @@ static MetaIntPreference preferences_int[] =
&cursor_size,
1, 128, 24,
},
+ { "icon-size",
+ KEY_GENERAL_SCHEMA,
+ META_PREF_ICON_SIZE,
+ &icon_size,
+ 6, G_MAXINT, META_DEFAULT_ICON_SIZE,
+ },
{ NULL, NULL, 0, NULL, 0, 0, 0, },
};
@@ -1111,6 +1119,12 @@ meta_prefs_get_cursor_size (void)
return cursor_size * scale;
}
+int
+meta_prefs_get_icon_size (void)
+{
+ return icon_size;
+}
+
gboolean
meta_prefs_is_in_skip_list (char *class)
{
@@ -1623,6 +1637,9 @@ meta_preference_to_string (MetaPreference pref)
case META_PREF_CURSOR_SIZE:
return "CURSOR_SIZE";
+ case META_PREF_ICON_SIZE:
+ return "ICON_SIZE";
+
case META_PREF_COMPOSITING_MANAGER:
return "COMPOSITING_MANAGER";
diff --git a/src/core/screen.c b/src/core/screen.c
index e14f8d52..9b084bcf 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -35,6 +35,7 @@
#include "prefs.h"
#include "workspace.h"
#include "keybindings.h"
+#include "prefs.h"
#include "stack.h"
#include "xprops.h"
#include "compositor.h"
@@ -118,14 +119,15 @@ set_supported_hint (MetaScreen *screen)
static int
set_wm_icon_size_hint (MetaScreen *screen)
{
+ int icon_size = meta_prefs_get_icon_size();
#define N_VALS 6
gulong vals[N_VALS];
/* min width, min height, max w, max h, width inc, height inc */
- vals[0] = META_ICON_WIDTH;
- vals[1] = META_ICON_HEIGHT;
- vals[2] = META_ICON_WIDTH;
- vals[3] = META_ICON_HEIGHT;
+ vals[0] = icon_size; /* width */
+ vals[1] = icon_size; /* height */
+ vals[2] = icon_size; /* width */
+ vals[3] = icon_size; /* height */
vals[4] = 0;
vals[5] = 0;
diff --git a/src/core/window.c b/src/core/window.c
index fce395b9..0a2582e9 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -6042,6 +6042,8 @@ meta_window_update_icon_now (MetaWindow *window)
icon = NULL;
mini_icon = NULL;
+
+ int icon_size = meta_prefs_get_icon_size();
if (meta_read_icons (window->screen,
window->xwindow,
@@ -6049,7 +6051,8 @@ meta_window_update_icon_now (MetaWindow *window)
window->wm_hints_pixmap,
window->wm_hints_mask,
&icon,
- META_ICON_WIDTH, META_ICON_HEIGHT,
+ icon_size, /* width */
+ icon_size, /* height */
&mini_icon,
META_MINI_ICON_WIDTH,
META_MINI_ICON_HEIGHT))