19928N/A--- gksu-2.0.2/gksu/gksu.c-orig 2011-01-05 16:53:59.322662397 -0600
19928N/A+++ gksu-2.0.2/gksu/gksu.c 2011-01-05 16:54:01.300784043 -0600
19928N/A@@ -27,7 +27,7 @@
19928N/A
19928N/A /* GLOBALS */
19928N/A gboolean print_pass = FALSE;
19928N/A-gboolean force_grab = FALSE;
19928N/A+gboolean force_grab = TRUE;
19928N/A gboolean prompt = FALSE;
19928N/A gboolean elevated_privilege = TRUE;
19928N/A gboolean elevated_role = TRUE;
19928N/A@@ -540,6 +540,11 @@ main (int argc, char **argv)
19928N/A
19928N/A int c = 0;
19928N/A
19928N/A+ char **gconf_argv;
19928N/A+ char *gconf_cmd;
19928N/A+ char *std_output;
19928N/A+ char *std_error;
19928N/A+
19928N/A setlocale (6, "");
19928N/A bindtextdomain(PACKAGE_NAME, LOCALEDIR);
19928N/A bind_textdomain_codeset (PACKAGE_NAME, "UTF-8");
19928N/A@@ -676,8 +681,42 @@ main (int argc, char **argv)
19928N/A g_free (myname);
19928N/A }
19928N/A
19928N/A- if (force_grab)
19928N/A- gksu_context_set_grab (context, TRUE);
19928N/A+ /*
19928N/A+ * Disable the grab if accessibility is on, since it causes issues
19928N/A+ * for GOK, dasher and other AT programs where the user may need to interact
19928N/A+ * with other GUI programs. Note that we call gconftool-2 instead of using
19928N/A+ * GConf interfaces since it seems using GConf in gksu causes problems for
19928N/A+ * a11y if you run a program with gksu that has a GUI. The launched program
19928N/A+ * will not work with a11y if gksu uses GConf, but calling gconftool-2 works.
19928N/A+ */
19928N/A+ gconf_cmd = g_strdup ("/usr/bin/gconftool-2 --get /desktop/gnome/interface/accessibility");
19928N/A+ error = NULL;
19928N/A+ std_output = NULL;
19928N/A+ std_error = NULL;
19928N/A+
19928N/A+ g_shell_parse_argv (gconf_cmd, NULL, &gconf_argv, &error);
19928N/A+
19928N/A+ error = NULL;
19928N/A+
19928N/A+ g_spawn_sync (NULL,
19928N/A+ gconf_argv,
19928N/A+ NULL,
19928N/A+ 0,
19928N/A+ NULL,
19928N/A+ NULL,
19928N/A+ &std_output,
19928N/A+ &std_error,
19928N/A+ NULL,
19928N/A+ &error);
19928N/A+
19928N/A+ g_strchomp (std_output);
19928N/A+
19928N/A+ if (std_output != NULL && strcmp (std_output, "true") == 0)
19928N/A+ {
19928N/A+ force_grab = FALSE;
19928N/A+ }
19928N/A+
19928N/A+ gksu_context_set_grab (context, force_grab);
19928N/A
19928N/A if (prompt)
19928N/A {