Lines 44-49
Link Here
|
44 |
#define KEY_FOCUS_MODE "/apps/metacity/general/focus_mode" |
44 |
#define KEY_FOCUS_MODE "/apps/metacity/general/focus_mode" |
45 |
#define KEY_FOCUS_NEW_WINDOWS "/apps/metacity/general/focus_new_windows" |
45 |
#define KEY_FOCUS_NEW_WINDOWS "/apps/metacity/general/focus_new_windows" |
46 |
#define KEY_RAISE_ON_CLICK "/apps/metacity/general/raise_on_click" |
46 |
#define KEY_RAISE_ON_CLICK "/apps/metacity/general/raise_on_click" |
|
|
47 |
#define KEY_XINERAMA_LAUNCH_WINDOW_ON_FOCUS_SCREEN "/apps/metacity/general/xinerama_launch_window_on_focus_screen" |
47 |
#define KEY_ACTION_DOUBLE_CLICK_TITLEBAR "/apps/metacity/general/action_double_click_titlebar" |
48 |
#define KEY_ACTION_DOUBLE_CLICK_TITLEBAR "/apps/metacity/general/action_double_click_titlebar" |
48 |
#define KEY_AUTO_RAISE "/apps/metacity/general/auto_raise" |
49 |
#define KEY_AUTO_RAISE "/apps/metacity/general/auto_raise" |
49 |
#define KEY_AUTO_RAISE_DELAY "/apps/metacity/general/auto_raise_delay" |
50 |
#define KEY_AUTO_RAISE_DELAY "/apps/metacity/general/auto_raise_delay" |
Lines 84-89
Link Here
|
84 |
static MetaVirtualModifier mouse_button_mods = Mod1Mask; |
85 |
static MetaVirtualModifier mouse_button_mods = Mod1Mask; |
85 |
static MetaFocusMode focus_mode = META_FOCUS_MODE_CLICK; |
86 |
static MetaFocusMode focus_mode = META_FOCUS_MODE_CLICK; |
86 |
static MetaFocusNewWindows focus_new_windows = META_FOCUS_NEW_WINDOWS_SMART; |
87 |
static MetaFocusNewWindows focus_new_windows = META_FOCUS_NEW_WINDOWS_SMART; |
|
|
88 |
static gboolean xinerama_launch_window_on_focus_screen = FALSE; |
87 |
static gboolean raise_on_click = TRUE; |
89 |
static gboolean raise_on_click = TRUE; |
88 |
static char* current_theme = NULL; |
90 |
static char* current_theme = NULL; |
89 |
static int num_workspaces = 4; |
91 |
static int num_workspaces = 4; |
Lines 130-135
Link Here
|
130 |
static gboolean update_focus_mode (const char *value); |
132 |
static gboolean update_focus_mode (const char *value); |
131 |
static gboolean update_focus_new_windows (const char *value); |
133 |
static gboolean update_focus_new_windows (const char *value); |
132 |
static gboolean update_raise_on_click (gboolean value); |
134 |
static gboolean update_raise_on_click (gboolean value); |
|
|
135 |
#ifdef HAVE_XINERAMA |
136 |
static gboolean update_xinerama_launch_window_on_focus_screen (gboolean value); |
137 |
#endif |
133 |
static gboolean update_theme (const char *value); |
138 |
static gboolean update_theme (const char *value); |
134 |
static gboolean update_visual_bell (gboolean v1, gboolean v2); |
139 |
static gboolean update_visual_bell (gboolean v1, gboolean v2); |
135 |
static gboolean update_visual_bell_type (const char *value); |
140 |
static gboolean update_visual_bell_type (const char *value); |
Lines 384-392
Link Here
|
384 |
update_focus_new_windows (str_val); |
389 |
update_focus_new_windows (str_val); |
385 |
g_free (str_val); |
390 |
g_free (str_val); |
386 |
|
391 |
|
|
|
392 |
if (get_bool (KEY_XINERAMA_LAUNCH_WINDOW_ON_FOCUS_SCREEN, &bool_val)) |
393 |
update_xinerama_launch_window_on_focus_screen (bool_val); |
394 |
|
387 |
if (get_bool (KEY_RAISE_ON_CLICK, &bool_val)) |
395 |
if (get_bool (KEY_RAISE_ON_CLICK, &bool_val)) |
388 |
update_raise_on_click (bool_val); |
396 |
update_raise_on_click (bool_val); |
389 |
|
|
|
390 |
str_val = gconf_client_get_string (default_client, |
397 |
str_val = gconf_client_get_string (default_client, |
391 |
KEY_ACTION_DOUBLE_CLICK_TITLEBAR, |
398 |
KEY_ACTION_DOUBLE_CLICK_TITLEBAR, |
392 |
&err); |
399 |
&err); |
Lines 588-593
Link Here
|
588 |
if (update_focus_new_windows (str)) |
595 |
if (update_focus_new_windows (str)) |
589 |
queue_changed (META_PREF_FOCUS_NEW_WINDOWS); |
596 |
queue_changed (META_PREF_FOCUS_NEW_WINDOWS); |
590 |
} |
597 |
} |
|
|
598 |
else if (strcmp (key, KEY_XINERAMA_LAUNCH_WINDOW_ON_FOCUS_SCREEN) == 0) |
599 |
{ |
600 |
gboolean b; |
601 |
|
602 |
if (value && value->type != GCONF_VALUE_BOOL) |
603 |
{ |
604 |
meta_warning (_("GConf key \"%s\" is set to an invalid type\n"), |
605 |
KEY_XINERAMA_LAUNCH_WINDOW_ON_FOCUS_SCREEN); |
606 |
goto out; |
607 |
} |
608 |
|
609 |
b = value ? gconf_value_get_bool (value) : TRUE; |
610 |
|
611 |
if (update_xinerama_launch_window_on_focus_screen (b)) |
612 |
queue_changed (META_PREF_XINERAMA_LAUNCH_WINDOW_ON_FOCUS_SCREEN); |
613 |
} |
591 |
else if (strcmp (key, KEY_RAISE_ON_CLICK) == 0) |
614 |
else if (strcmp (key, KEY_RAISE_ON_CLICK) == 0) |
592 |
{ |
615 |
{ |
593 |
gboolean b; |
616 |
gboolean b; |
Lines 1059-1064
Link Here
|
1059 |
#endif /* HAVE_GCONF */ |
1082 |
#endif /* HAVE_GCONF */ |
1060 |
|
1083 |
|
1061 |
#ifdef HAVE_GCONF |
1084 |
#ifdef HAVE_GCONF |
|
|
1085 |
#ifdef HAVE_XINERAMA |
1086 |
static gboolean |
1087 |
update_xinerama_launch_window_on_focus_screen (gboolean value) |
1088 |
{ |
1089 |
gboolean old = xinerama_launch_window_on_focus_screen; |
1090 |
|
1091 |
xinerama_launch_window_on_focus_screen = value; |
1092 |
|
1093 |
return old != value; |
1094 |
} |
1095 |
#endif /* HAVE_XINERAMA */ |
1096 |
#endif /* HAVE_GCONF */ |
1097 |
|
1098 |
#ifdef HAVE_GCONF |
1062 |
static gboolean |
1099 |
static gboolean |
1063 |
update_theme (const char *value) |
1100 |
update_theme (const char *value) |
1064 |
{ |
1101 |
{ |
Lines 1119-1124
Link Here
|
1119 |
return raise_on_click || focus_mode == META_FOCUS_MODE_CLICK; |
1156 |
return raise_on_click || focus_mode == META_FOCUS_MODE_CLICK; |
1120 |
} |
1157 |
} |
1121 |
|
1158 |
|
|
|
1159 |
#ifdef HAVE_GCONF |
1160 |
#ifdef HAVE_XINERAMA |
1161 |
gboolean |
1162 |
meta_prefs_get_xinerama_launch_window_on_focus_screen (void) |
1163 |
{ |
1164 |
/* Force new windows come up on the currently active screen |
1165 |
*/ |
1166 |
return xinerama_launch_window_on_focus_screen; |
1167 |
} |
1168 |
#endif /* HAVE_XINERAMA */ |
1169 |
#endif /* HAVE_GCONF */ |
1170 |
|
1122 |
const char* |
1171 |
const char* |
1123 |
meta_prefs_get_theme (void) |
1172 |
meta_prefs_get_theme (void) |
1124 |
{ |
1173 |
{ |
Lines 1608-1613
Link Here
|
1608 |
case META_PREF_FOCUS_NEW_WINDOWS: |
1657 |
case META_PREF_FOCUS_NEW_WINDOWS: |
1609 |
return "FOCUS_NEW_WINDOWS"; |
1658 |
return "FOCUS_NEW_WINDOWS"; |
1610 |
|
1659 |
|
|
|
1660 |
case META_PREF_XINERAMA_LAUNCH_WINDOW_ON_FOCUS_SCREEN: |
1661 |
return "XINERAMA_LAUNCH_WINDOW_ON_FOCUS_SCREEN"; |
1662 |
|
1611 |
case META_PREF_RAISE_ON_CLICK: |
1663 |
case META_PREF_RAISE_ON_CLICK: |
1612 |
return "RAISE_ON_CLICK"; |
1664 |
return "RAISE_ON_CLICK"; |
1613 |
|
1665 |
|