1
diff -Nur metacity-2.11.0.orig/src/display.c metacity-2.11.0/src/display.c
2
--- metacity-2.11.0.orig/src/display.c 2005-07-12 21:20:32.000000000 +0200
3
+++ metacity-2.11.0/src/display.c 2005-07-13 11:35:05.000000000 +0200
5
* in click to focus mode? The debate rages.
6
* Feel free to change TRUE to FALSE or vice versa
8
- if (TRUE /* meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK */)
9
+ /* if (TRUE /* meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK )*/
10
+ if(meta_prefs_get_raise_on_click ())
11
meta_window_raise (window);
13
meta_topic (META_DEBUG_FOCUS,
14
diff -Nur metacity-2.11.0.orig/src/metacity.schemas.in metacity-2.11.0/src/metacity.schemas.in
15
--- metacity-2.11.0.orig/src/metacity.schemas.in 2005-05-26 17:37:49.000000000 +0200
16
+++ metacity-2.11.0/src/metacity.schemas.in 2005-07-13 11:35:05.000000000 +0200
21
+ <key>/schemas/apps/metacity/general/raise_on_click</key>
22
+ <applyto>/apps/metacity/general/raise_on_click</applyto>
23
+ <owner>metacity</owner>
25
+ <default>true</default>
27
+ <short>Raise current window if click event occurs</short>
29
+ If true the focused window will be automatically raised.
35
<key>/schemas/apps/metacity/general/auto_raise_delay</key>
36
<applyto>/apps/metacity/general/auto_raise_delay</applyto>
37
<owner>metacity</owner>
38
diff -Nur metacity-2.11.0.orig/src/prefs.c metacity-2.11.0/src/prefs.c
39
--- metacity-2.11.0.orig/src/prefs.c 2005-07-12 23:27:28.000000000 +0200
40
+++ metacity-2.11.0/src/prefs.c 2005-07-13 11:38:03.000000000 +0200
42
#define KEY_BUTTON_LAYOUT "/apps/metacity/general/button_layout"
43
#define KEY_REDUCED_RESOURCES "/apps/metacity/general/reduced_resources"
44
#define KEY_GNOME_ACCESSIBILITY "/desktop/gnome/interface/accessibility"
45
+#define KEY_RAISE_ON_CLICK "/apps/metacity/general/raise_on_click"
47
#define KEY_COMMAND_PREFIX "/apps/metacity/keybinding_commands/command_"
50
static gboolean bell_is_audible = TRUE;
51
static gboolean reduced_resources = FALSE;
52
static gboolean gnome_accessibility = FALSE;
53
+static gboolean raise_on_click = FALSE;
54
static char *cursor_theme = NULL;
55
static int cursor_size = 24;
58
static gboolean update_action_double_click_titlebar (const char *value);
59
static gboolean update_auto_raise (gboolean value);
60
static gboolean update_auto_raise_delay (int value);
61
+static gboolean update_raise_on_click (gboolean value);
62
static gboolean update_button_layout (const char *value);
63
static gboolean update_window_binding (const char *name,
68
gboolean bool_val, bool_val_2;
71
if (default_client != NULL)
76
update_auto_raise_delay (int_val);
79
+ bool_val = gconf_client_get_bool (default_client, KEY_RAISE_ON_CLICK,
81
+ cleanup_error (&err);
82
+ update_raise_on_click (bool_val);
84
str_val = gconf_client_get_string (default_client, KEY_THEME,
88
queue_changed (META_PREF_AUTO_RAISE_DELAY);
91
+ else if (strcmp (key, KEY_RAISE_ON_CLICK) == 0)
95
+ if (value && value->type != GCONF_VALUE_BOOL)
97
+ meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
98
+ KEY_RAISE_ON_CLICK);
102
+ b = value ? gconf_value_get_bool (value) : raise_on_click;
104
+ if (update_raise_on_click (b))
105
+ queue_changed (META_PREF_RAISE_ON_CLICK);
107
else if (str_has_prefix (key, KEY_COMMAND_PREFIX))
110
@@ -1443,6 +1466,16 @@
111
return old != auto_raise;
115
+update_raise_on_click (gboolean value)
117
+ gboolean old = raise_on_click;
119
+ raise_on_click = value;
121
+ return old != raise_on_click;
124
#define MAX_REASONABLE_AUTO_RAISE_DELAY 10000
127
@@ -1523,6 +1556,9 @@
128
case META_PREF_AUTO_RAISE:
131
+ case META_PREF_RAISE_ON_CLICK:
132
+ return "RAISE_ON_CLICK";
134
case META_PREF_AUTO_RAISE_DELAY:
135
return "AUTO_RAISE_DELAY";
137
@@ -2259,6 +2295,12 @@
142
+meta_prefs_get_raise_on_click ()
144
+ return raise_on_click;
148
meta_prefs_get_auto_raise_delay (void)
150
diff -Nur metacity-2.11.0.orig/src/prefs.h metacity-2.11.0/src/prefs.h
151
--- metacity-2.11.0.orig/src/prefs.h 2005-07-12 23:27:28.000000000 +0200
152
+++ metacity-2.11.0/src/prefs.h 2005-07-13 11:38:36.000000000 +0200
154
META_PREF_VISUAL_BELL_TYPE,
155
META_PREF_REDUCED_RESOURCES,
156
META_PREF_GNOME_ACCESSIBILITY,
157
+ META_PREF_RAISE_ON_CLICK,
158
META_PREF_CURSOR_THEME,
159
- META_PREF_CURSOR_SIZE
160
+ META_PREF_CURSOR_SIZE,
163
typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
165
int meta_prefs_get_auto_raise_delay (void);
166
gboolean meta_prefs_get_reduced_resources (void);
167
gboolean meta_prefs_get_gnome_accessibility (void);
168
+gboolean meta_prefs_get_raise_on_click (void);
170
const char* meta_prefs_get_command (int i);