mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
Don't wireframe when accessibility is on, it apparently causes a desktop
2005-01-26 Arvind Samptur <arvind.samptur@wipro.com> Don't wireframe when accessibility is on, it apparently causes a desktop wide freeze. * src/prefs.[ch] (meta_prefs_init) (change_notify) (update_gnome_accessibility) (meta_preference_to_string) (meta_prefs_get_gnome_accessibility) : Add code to monitor accessibility status. * src/display.c (meta_display_begin_grab_op): Check accessibility status before going ahead with wireframe. Fixes #159538
This commit is contained in:
parent
ebaa77c312
commit
cf102c12f4
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
2005-01-26 Arvind Samptur <arvind.samptur@wipro.com>
|
||||
|
||||
Don't wireframe when accessibility is on, it apparently
|
||||
causes a desktop wide freeze.
|
||||
|
||||
* src/prefs.[ch] (meta_prefs_init) (change_notify)
|
||||
(update_gnome_accessibility) (meta_preference_to_string)
|
||||
(meta_prefs_get_gnome_accessibility) : Add code to monitor
|
||||
accessibility status.
|
||||
|
||||
* src/display.c (meta_display_begin_grab_op): Check
|
||||
accessibility status before going ahead with wireframe.
|
||||
Fixes #159538
|
||||
|
||||
2005-01-25 Elijah Newren <newren@gmail.com>
|
||||
|
||||
* src/tabpopup.c: (meta_select_workspace_expose_event): ignore
|
||||
|
@ -3221,7 +3221,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
display->grab_anchor_window_pos = display->grab_initial_window_pos;
|
||||
|
||||
display->grab_wireframe_active =
|
||||
meta_prefs_get_reduced_resources () &&
|
||||
(meta_prefs_get_reduced_resources () && !meta_prefs_get_gnome_accessibility ()) &&
|
||||
(meta_grab_op_is_resizing (display->grab_op) ||
|
||||
meta_grab_op_is_moving (display->grab_op));
|
||||
|
||||
|
@ -271,7 +271,9 @@
|
||||
avoiding animations, or other means. This is a significant
|
||||
reduction in usability for many users, but may allow
|
||||
legacy applications and terminal servers to function
|
||||
when they would otherwise be impractical.
|
||||
when they would otherwise be impractical. However, the wireframe
|
||||
feature is disabled when accessibility is on to avoid weird desktop
|
||||
breakages
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
55
src/prefs.c
55
src/prefs.c
@ -52,6 +52,7 @@
|
||||
#define KEY_DISABLE_WORKAROUNDS "/apps/metacity/general/disable_workarounds"
|
||||
#define KEY_BUTTON_LAYOUT "/apps/metacity/general/button_layout"
|
||||
#define KEY_REDUCED_RESOURCES "/apps/metacity/general/reduced_resources"
|
||||
#define KEY_GNOME_ACCESSIBILITY "/desktop/gnome/interface/accessibility"
|
||||
|
||||
#define KEY_COMMAND_PREFIX "/apps/metacity/keybinding_commands/command_"
|
||||
|
||||
@ -88,6 +89,7 @@ static gboolean auto_raise_delay = 500;
|
||||
static gboolean provide_visual_bell = TRUE;
|
||||
static gboolean bell_is_audible = TRUE;
|
||||
static gboolean reduced_resources = FALSE;
|
||||
static gboolean gnome_accessibility = FALSE;
|
||||
|
||||
static MetaVisualBellType visual_bell_type = META_VISUAL_BELL_INVALID;
|
||||
static MetaButtonLayout button_layout = {
|
||||
@ -139,6 +141,7 @@ static gboolean update_terminal_command (const char *value);
|
||||
static gboolean update_workspace_name (const char *name,
|
||||
const char *value);
|
||||
static gboolean update_reduced_resources (gboolean value);
|
||||
static gboolean update_gnome_accessibility (gboolean value);
|
||||
|
||||
static void change_notify (GConfClient *client,
|
||||
guint cnxn_id,
|
||||
@ -315,6 +318,11 @@ meta_prefs_init (void)
|
||||
&err);
|
||||
cleanup_error (&err);
|
||||
|
||||
gconf_client_add_dir (default_client, KEY_GNOME_ACCESSIBILITY,
|
||||
GCONF_CLIENT_PRELOAD_RECURSIVE,
|
||||
&err);
|
||||
cleanup_error (&err);
|
||||
|
||||
str_val = gconf_client_get_string (default_client, KEY_MOUSE_BUTTON_MODS,
|
||||
&err);
|
||||
cleanup_error (&err);
|
||||
@ -412,6 +420,12 @@ meta_prefs_init (void)
|
||||
cleanup_error (&err);
|
||||
update_terminal_command (str_val);
|
||||
g_free (str_val);
|
||||
|
||||
bool_val = gconf_client_get_bool (default_client, KEY_GNOME_ACCESSIBILITY,
|
||||
&err);
|
||||
|
||||
cleanup_error (&err);
|
||||
update_gnome_accessibility (bool_val);
|
||||
#endif /* HAVE_GCONF */
|
||||
|
||||
/* Load keybindings prefs */
|
||||
@ -434,6 +448,12 @@ meta_prefs_init (void)
|
||||
NULL,
|
||||
NULL,
|
||||
&err);
|
||||
gconf_client_notify_add (default_client, KEY_GNOME_ACCESSIBILITY,
|
||||
change_notify,
|
||||
NULL,
|
||||
NULL,
|
||||
&err);
|
||||
|
||||
cleanup_error (&err);
|
||||
#endif /* HAVE_GCONF */
|
||||
}
|
||||
@ -810,6 +830,22 @@ change_notify (GConfClient *client,
|
||||
if (update_reduced_resources (b))
|
||||
queue_changed (META_PREF_REDUCED_RESOURCES);
|
||||
}
|
||||
else if (strcmp (key, KEY_GNOME_ACCESSIBILITY) == 0)
|
||||
{
|
||||
gboolean b;
|
||||
|
||||
if (value && value->type != GCONF_VALUE_BOOL)
|
||||
{
|
||||
meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
|
||||
KEY_GNOME_ACCESSIBILITY);
|
||||
goto out;
|
||||
}
|
||||
|
||||
b = value ? gconf_value_get_bool (value) : gnome_accessibility;
|
||||
|
||||
if (update_gnome_accessibility (b))
|
||||
queue_changed (META_PREF_GNOME_ACCESSIBILITY);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_PREFS, "Key %s doesn't mean anything to Metacity\n",
|
||||
@ -1326,6 +1362,16 @@ update_reduced_resources (gboolean value)
|
||||
|
||||
return old != reduced_resources;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
update_gnome_accessibility (gboolean value)
|
||||
{
|
||||
gboolean old = gnome_accessibility;
|
||||
|
||||
gnome_accessibility = value;
|
||||
|
||||
return old != gnome_accessibility;
|
||||
}
|
||||
#endif /* HAVE_GCONF */
|
||||
|
||||
#ifdef WITH_VERBOSE_MODE
|
||||
@ -1399,6 +1445,9 @@ meta_preference_to_string (MetaPreference pref)
|
||||
case META_PREF_REDUCED_RESOURCES:
|
||||
return "REDUCED_RESOURCES";
|
||||
break;
|
||||
case META_PREF_GNOME_ACCESSIBILITY:
|
||||
return "GNOME_ACCESSIBILTY";
|
||||
break;
|
||||
}
|
||||
|
||||
return "(unknown)";
|
||||
@ -2112,6 +2161,12 @@ meta_prefs_get_reduced_resources (void)
|
||||
return reduced_resources;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_prefs_get_gnome_accessibility ()
|
||||
{
|
||||
return gnome_accessibility;
|
||||
}
|
||||
|
||||
MetaKeyBindingAction
|
||||
meta_prefs_get_keybinding_action (const char *name)
|
||||
{
|
||||
|
@ -47,7 +47,8 @@ typedef enum
|
||||
META_PREF_VISUAL_BELL,
|
||||
META_PREF_AUDIBLE_BELL,
|
||||
META_PREF_VISUAL_BELL_TYPE,
|
||||
META_PREF_REDUCED_RESOURCES
|
||||
META_PREF_REDUCED_RESOURCES,
|
||||
META_PREF_GNOME_ACCESSIBILITY
|
||||
} MetaPreference;
|
||||
|
||||
typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
|
||||
@ -72,6 +73,7 @@ gboolean meta_prefs_get_disable_workarounds (void);
|
||||
gboolean meta_prefs_get_auto_raise (void);
|
||||
int meta_prefs_get_auto_raise_delay (void);
|
||||
gboolean meta_prefs_get_reduced_resources (void);
|
||||
gboolean meta_prefs_get_gnome_accessibility (void);
|
||||
|
||||
const char* meta_prefs_get_command (int i);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user