2005-01-03 Arvind Samptur <
[email protected]>
* metacity.spec: Add patch
* patches/metacity-08-wireframe-ally.diff: Add patch
to disable wireframe feature when accessibility is enabled.
Fixes #6200511. Patch approved by Erwann Chenede -
[email protected]
--- a/ChangeLog Thu Dec 30 22:57:45 2004 +0000
+++ b/ChangeLog Mon Jan 03 04:04:33 2005 +0000
@@ -1,3 +1,10 @@
+2005-01-03 Arvind Samptur <[email protected]>
+
+ * metacity.spec: Add patch
+ * patches/metacity-08-wireframe-ally.diff: Add patch
+ to disable wireframe feature when accessibility is enabled.
+ Fixes #6200511. Patch approved by Erwann Chenede - [email protected]
+
2004-12-30 Dave Lin <[email protected]>
* ext-sources/mozilla.sh.in:
--- a/metacity.spec Thu Dec 30 22:57:45 2004 +0000
+++ b/metacity.spec Mon Jan 03 04:04:33 2005 +0000
@@ -20,6 +20,7 @@
Patch5: metacity-05-bigstruts.diff
Patch6: metacity-06-raise-on-frame-click.diff
Patch7: metacity-07-logout-shortcut.diff
+Patch8: metacity-08-wireframe-ally.diff
URL: http://www.gnome.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Docdir: %{_defaultdocdir}/doc
@@ -50,6 +51,8 @@
%patch5 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
+
bzcat %SOURCE1 | tar xf -
bash -x %SOURCE6
@@ -124,6 +127,10 @@
%{_mandir}/man1/*
%changelog
+* Mon Jan 03 2005 - [email protected]
+- Add patch to disable wireframe feature when
+ accessiblity is on.
+
* Wed Nov 24 2004 - [email protected]
- Updated metacity-04-sunpowerswitch-key.diff to fix stopper bug #5104104.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/metacity-08-wireframe-ally.diff Mon Jan 03 04:04:33 2005 +0000
@@ -0,0 +1,167 @@
+--- metacity-2.8.0/src/prefs.h 2004-12-16 21:28:29.579352000 -0500
++++ metacity-2.8.0-new/src/prefs.h 2004-12-16 21:30:00.292318000 -0500
+@@ -46,7 +46,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,
+@@ -71,6 +72,7 @@ gboolean meta_prefs_g
+ 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);
+
+--- metacity-2.8.0/src/prefs.c 2004-12-16 21:28:29.567372000 -0500
++++ metacity-2.8.0-new/src/prefs.c 2004-12-16 22:18:59.176895000 -0500
+@@ -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_"
+ #define KEY_SCREEN_BINDINGS_PREFIX "/apps/metacity/global_keybindings"
+@@ -85,6 +86,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 = {
+@@ -133,6 +135,7 @@ static gboolean update_command
+ 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,
+@@ -304,6 +307,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);
+@@ -395,6 +403,12 @@ meta_prefs_init (void)
+ &err);
+ cleanup_error (&err);
+ update_reduced_resources (bool_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 */
+@@ -413,6 +427,13 @@ meta_prefs_init (void)
+ NULL,
+ &err);
+ cleanup_error (&err);
++
++ gconf_client_notify_add (default_client, KEY_GNOME_ACCESSIBILITY,
++ change_notify,
++ NULL,
++ NULL,
++ &err);
++ cleanup_error (&err);
+ #endif /* HAVE_GCONF */
+ }
+
+@@ -449,7 +470,6 @@ change_notify (GConfClient *client,
+
+ key = gconf_entry_get_key (entry);
+ value = gconf_entry_get_value (entry);
+-
+ if (strcmp (key, KEY_MOUSE_BUTTON_MODS) == 0)
+ {
+ const char *str;
+@@ -758,6 +778,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",
+@@ -1274,6 +1310,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
+@@ -1344,6 +1390,9 @@ meta_preference_to_string (MetaPreferenc
+ case META_PREF_REDUCED_RESOURCES:
+ return "REDUCED_RESOURCES";
+ break;
++ case META_PREF_GNOME_ACCESSIBILITY:
++ return "GNOME_ACCESSIBILTY";
++ break;
+ }
+
+ return "(unknown)";
+@@ -2019,6 +2068,12 @@ meta_prefs_get_reduced_resources ()
+ return reduced_resources;
+ }
+
++gboolean
++meta_prefs_get_gnome_accessibility ()
++{
++ return gnome_accessibility;
++}
++
+ MetaKeyBindingAction
+ meta_prefs_get_keybinding_action (const char *name)
+ {
+--- metacity-2.8.0/src/display.c 2004-12-16 21:28:29.360566000 -0500
++++ metacity-2.8.0-new/src/display.c 2004-12-16 21:30:00.307333000 -0500
+@@ -2982,7 +2982,7 @@ meta_display_begin_grab_op (MetaDisplay
+ 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));
+