Mercurial > emacs
changeset 34673:77cda2c018e5
(x_connection_closed): Prevent being called recursively
because of an error condition in XtCloseDisplay.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 18 Dec 2000 12:54:00 +0000 |
parents | 8f55d03259de |
children | 79dde983f45b |
files | src/xterm.c |
diffstat | 1 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xterm.c Mon Dec 18 12:36:36 2000 +0000 +++ b/src/xterm.c Mon Dec 18 12:54:00 2000 +0000 @@ -11256,11 +11256,11 @@ /* Handle the loss of connection to display DISPLAY. */ static SIGTYPE -x_connection_closed (display, error_message) - Display *display; +x_connection_closed (dpy, error_message) + Display *dpy; char *error_message; { - struct x_display_info *dpyinfo = x_display_info_for_display (display); + struct x_display_info *dpyinfo = x_display_info_for_display (dpy); Lisp_Object frame, tail; /* We have to close the display to inform Xt that it doesn't @@ -11279,7 +11279,15 @@ in OpenWindows. I don't know how to cicumvent it here. */ #ifdef USE_X_TOOLKIT - XtCloseDisplay (display); + { + /* Prevent being called recursively because of an error condition + in XtCloseDisplay. Otherwise, we might end up with printing + ``can't find per display information'' in the recursive call + instead of printing the original message here. */ + int count = x_catch_errors (dpy); + XtCloseDisplay (dpy); + x_uncatch_errors (dpy, count); + } #endif /* Indicate that this display is dead. */