? revised-logout-a11y-patch.diff
? gnome-session/revised-logout-a11y-patch.diff
Index: gnome-session/ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/ChangeLog,v
retrieving revision 1.392
diff -u -r1.392 ChangeLog
--- gnome-session/ChangeLog	2 Dec 2003 18:27:10 -0000	1.392
+++ gnome-session/ChangeLog	3 Dec 2003 15:39:56 -0000
@@ -1,3 +1,10 @@
+2003-12-03  Bill Haneman <billh@gnome.org>
+
+	* logout.c: (display_gui): Use standard override-redirect 
+	if the server is grabbed, but use an improved version of the old
+	patch's logic if a11y is turned on.  Also, wait for gtk
+	idle before moving our grabs in the a11y case.
+
 2003-12-02  Mark McLoughlin  <mark@skynet.ie>
 
 	* logout.c: (display_gui): Revert Bill's patch for #122737
Index: gnome-session/logout.c
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/logout.c,v
retrieving revision 1.53
diff -u -r1.53 logout.c
--- gnome-session/logout.c	2 Dec 2003 18:27:10 -0000	1.53
+++ gnome-session/logout.c	3 Dec 2003 15:39:57 -0000
@@ -159,6 +159,7 @@
 
       g_free (fadeout);
     
+      XUngrabServer (GDK_DISPLAY ());
       return FALSE;
     }
 
@@ -396,7 +397,7 @@
    */
   if (!a11y_enabled)
     {
-      XGrabServer (GDK_DISPLAY ());
+      XGrabServer (GDK_DISPLAY ()); 
       gsm_foreach_screen (fadeout_screen);
     }
 
@@ -404,12 +405,17 @@
   gtk_dialog_add_button (GTK_DIALOG (box), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
   gtk_dialog_add_button (GTK_DIALOG (box), GTK_STOCK_OK, GTK_RESPONSE_OK);
 
-  g_object_set (G_OBJECT (box), "type", GTK_WINDOW_POPUP, NULL);
-
   gtk_dialog_set_default_response (GTK_DIALOG (box), GTK_RESPONSE_OK);
   gtk_window_set_screen (GTK_WINDOW (box), screen);
   gtk_window_set_policy (GTK_WINDOW (box), FALSE, FALSE, TRUE);
-
+  if (a11y_enabled) 
+  {
+      gtk_window_set_decorated (GTK_WINDOW (box), FALSE); 
+  }
+  else
+  {
+      g_object_set (G_OBJECT (box), "type", GTK_WINDOW_POPUP);
+  }
   gtk_container_set_border_width (GTK_CONTAINER (box), 5);
 
   if (!autosave)
@@ -474,6 +480,18 @@
   gsm_center_window_on_screen (GTK_WINDOW (box), screen, monitor);
 
   gtk_widget_show_all (box);
+ 
+  /* 
+   * If this is not override-redirect, we must map before moving our grabs.
+   * This also makes sure our ATK notifications are emitted before the grab.
+   */
+  if (a11y_enabled)
+  {
+      while (gtk_events_pending ()) 
+      {
+	  gtk_main_iteration ();
+      }
+  }
 
   /* Move the grabs to our message box */
   gdk_pointer_grab (box->window, TRUE, 0,
