diff options
author | Mark McLoughlin <mark@skynet.ie> | 2002-09-20 00:06:26 +0000 |
---|---|---|
committer | Mark McLoughlin <mmclouglin@src.gnome.org> | 2002-09-20 00:06:26 +0000 |
commit | 5b1b3bf0f6907ed58f7553699cc20f5dd097e89a (patch) | |
tree | 815b44711394f77b74c2ea0590559764071cafb5 /gnome-session/logout.c | |
parent | 99ae962be230ef7fd601f354d473575ffd52b083 (diff) | |
download | gnome-session-5b1b3bf0f6907ed58f7553699cc20f5dd097e89a.tar.gz |
only grab the server and draw the iris if accessibility is not enabled.
2002-09-20 Mark McLoughlin <mark@skynet.ie>
* logout.c: (display_gui): only grab the server and
draw the iris if accessibility is not enabled. Fixes
hang on logout with accessibility, #93103. Patch
from Padraig O'Briain.
Diffstat (limited to 'gnome-session/logout.c')
-rw-r--r-- | gnome-session/logout.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/gnome-session/logout.c b/gnome-session/logout.c index a17529c7..aa66dad6 100644 --- a/gnome-session/logout.c +++ b/gnome-session/logout.c @@ -227,6 +227,7 @@ display_gui (void) gboolean save_active = FALSE; gboolean halt_active = FALSE; gboolean reboot_active = FALSE; + gboolean a11y_enabled; GError *error = NULL; GdkScreen *screen; int monitor; @@ -263,14 +264,22 @@ display_gui (void) force_pango_cache_init (); - XGrabServer (GDK_DISPLAY ()); - iris (); - box = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, _("Are you sure you want to log out?")); + a11y_enabled = GTK_IS_ACCESSIBLE (gtk_widget_get_accessible (box)); + + /* Grabbing the Xserver when accessibility is enabled will cause + * a hang. See #93103 for details. + */ + if (!a11y_enabled) + { + XGrabServer (GDK_DISPLAY ()); + iris (); + } + gtk_dialog_add_button (GTK_DIALOG (box), GTK_STOCK_HELP, GTK_RESPONSE_HELP); 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); @@ -352,8 +361,11 @@ display_gui (void) gtk_widget_destroy (box); - gsm_foreach_screen (refresh_screen); - XUngrabServer (GDK_DISPLAY ()); + if (!a11y_enabled) + { + gsm_foreach_screen (refresh_screen); + XUngrabServer (GDK_DISPLAY ()); + } gdk_pointer_ungrab (GDK_CURRENT_TIME); gdk_keyboard_ungrab (GDK_CURRENT_TIME); |