6395649 at-spi-registryd starts when screen is locked even when accessible device support is off
authorSam Lau <Sam.Lau@Sun.COM>
Mon, 20 Nov 2006 13:16:25 -0800
changeset 84 66b8b4738b3b
parent 83 efbfcbab4a19
child 85 a99b452f0aa6
6395649 at-spi-registryd starts when screen is locked even when accessible device support is off 6461887 GNOME screen lock does not prevent access to other applications via 'alt-tab'
open-src/app/xscreensaver/Makefile
open-src/app/xscreensaver/bug-6461887.patch
--- a/open-src/app/xscreensaver/Makefile	Thu Nov 16 15:42:31 2006 -0800
+++ b/open-src/app/xscreensaver/Makefile	Mon Nov 20 13:16:25 2006 -0800
@@ -30,7 +30,7 @@
 # or other dealings in this Software without prior written authorization
 # of the copyright holder.
 #
-# @(#)Makefile	1.69	06/10/24
+# @(#)Makefile	1.70	06/11/20
 #
 
 PWD:sh=pwd
@@ -69,7 +69,8 @@
 	barcode-hack.patch \
 	glsnake.patch \
         allowRootByPassFlag.patch \
-	bug-6478841.patch
+	bug-6478841.patch \
+	bug-6461887.patch
 
 # Directory created by unpacking source
 SOURCE_DIR=$(BUILD_DIR)/xscreensaver-$(XSCREENSAVER_VERS)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/app/xscreensaver/bug-6461887.patch	Mon Nov 20 13:16:25 2006 -0800
@@ -0,0 +1,136 @@
+/*
+ * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
+ *
+ */
+
+diff -urp -x '*~' driver/xscreensaver.c driver~/xscreensaver.c
+--- driver/xscreensaver.c	2006-10-27 11:32:52.983453000 -0700
++++ driver~/xscreensaver.c	2006-11-16 12:39:17.811467000 -0800
+@@ -152,6 +152,7 @@
+ #include <X11/StringDefs.h>
+ #include <X11/Shell.h>
+ #include <X11/Xos.h>
++#include <gconf/gconf-client.h>
+ #include <time.h>
+ #include <sys/time.h>
+ #include <netdb.h>	/* for gethostbyname() */
+@@ -1208,10 +1209,21 @@ main_loop (saver_info *si)
+ ** pop-up diaglog
+ */
+ 
+- /* GTK Accessibility Module initialized */
++/*
++** 2135519 at-spi-registryd starts when screen is locked even
++** when accessible device support is off(SR)
++** per AT core gp suggestion
++** GTK_MODULES is set only if at support is enabled
++*/
++
++  if (gconf_client_get_bool(gconf_client_get_default(), \
++        "/desktop/gnome/interface/accessibility",NULL))
++  {
+   modulesptr = getenv ("GTK_MODULES");
+   if (!modulesptr || modulesptr [0] == '\0')
+         putenv ("GTK_MODULES=gail:atk-bridge");
++  }
++
+ 
+   while (1)
+     {
+diff -urp -x '*~' driver/lock.c driver~/lock.c
+--- driver/lock.c	2006-10-27 11:32:50.941587000 -0700
++++ driver~/lock.c	2006-11-16 12:50:05.636112000 -0800
+@@ -29,6 +29,7 @@
+ #include "exec.h"
+ #include "xscreensaver.h"
+ #include "resources.h"
++#include <gconf/gconf-client.h>
+ 
+ #ifndef NO_LOCKING              /* (mostly) whole file */
+ 
+@@ -116,6 +117,9 @@ Bool at_enabled = False; 	/* Ass. Tech s
+ 				*/
+ Bool winatt_reset[2] = {FALSE,FALSE};
+ 
++char  *globalkey_text = NULL;
++GConfClient *client = NULL;
++
+ /* 
+ 5083155 Unable to unlock screen when running dual-head MAG
+ *adding dual or multiple heads for magnifier support
+@@ -372,7 +376,11 @@ fprintf(stderr,"Debug: ==> winatt_reset[
+ 	/* common parent, i.e root win */
+ 
+ /* cases for running GOK , or MAG or GOK+MAG */
+-
++/* 6461887(P1) screen lock does not prevent access to other
++**  applications via 'alt-tab',
++*/
++	client = gconf_client_get_default();
++       
+         if (no_atserv > 0) {
+         /* pop-up dialog in dock mode */
+ /* AT_LOCK_DEBUG
+@@ -383,6 +391,11 @@ fprintf(stderr,"==> found dialog wid 0x%
+           XUngrabPointer(si->dpy, CurrentTime);
+           si->at_external_passwd = True;
+           XFlush(si->dpy);
++          globalkey_text = gconf_client_get_string (client, \
++        "/apps/metacity/global_keybindings/switch_windows", NULL);
++          if (globalkey_text && strncmp(globalkey_text,"dis",3))
++	    gconf_client_set_string (client, \
++        "/apps/metacity/global_keybindings/switch_windows", "disabled", NULL);
+         }
+ 	/* no MAG or GOK, only SPEECH is running 
+ 	   just Ass. Tech support is selected
+@@ -393,6 +406,12 @@ fprintf(stderr,"==> found dialog wid 0x%
+           	XUngrabPointer(si->dpy, CurrentTime);
+ 		si->at_external_passwd = True;
+ 		XFlush(si->dpy);
++		globalkey_text = \
++		  gconf_client_get_string(client, \
++		  "/apps/metacity/global_keybindings/switch_windows", NULL);
++          	if ( globalkey_text && strncmp(globalkey_text,"dis",3))
++		  gconf_client_set_string ( client, \
++	"/apps/metacity/global_keybindings/switch_windows", "disabled", NULL);
+ 	}
+ 
+ /*  AT_LOCK_DEBUG
+@@ -1509,7 +1528,13 @@ destroy_passwd_window (saver_info *si)
+ */
+    }
+  }
+-
++/*
++** restore the prev one
++*/
++	if ( client && globalkey_text)
++	gconf_client_set_string ( client, \
++        "/apps/metacity/global_keybindings/switch_windows", \
++	globalkey_text, NULL);
+ }