aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-12-18 12:54:00 +0000
committerGerd Moellmann2000-12-18 12:54:00 +0000
commit5978125e6aa9491f41acfdbd243366494b475847 (patch)
tree2a8fe2f57c174a0e62ca4488f6ce804ea99fde36 /src
parent573191a15340f0aa45c9d9114a1a68c54a09a3ab (diff)
downloademacs-5978125e6aa9491f41acfdbd243366494b475847.tar.gz
emacs-5978125e6aa9491f41acfdbd243366494b475847.zip
(x_connection_closed): Prevent being called recursively
because of an error condition in XtCloseDisplay.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/xterm.c b/src/xterm.c
index d45dfd8c7e1..47b3f532e92 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -11256,11 +11256,11 @@ x_connection_signal (signalnum) /* If we don't have an argument, */
11256/* Handle the loss of connection to display DISPLAY. */ 11256/* Handle the loss of connection to display DISPLAY. */
11257 11257
11258static SIGTYPE 11258static SIGTYPE
11259x_connection_closed (display, error_message) 11259x_connection_closed (dpy, error_message)
11260 Display *display; 11260 Display *dpy;
11261 char *error_message; 11261 char *error_message;
11262{ 11262{
11263 struct x_display_info *dpyinfo = x_display_info_for_display (display); 11263 struct x_display_info *dpyinfo = x_display_info_for_display (dpy);
11264 Lisp_Object frame, tail; 11264 Lisp_Object frame, tail;
11265 11265
11266 /* We have to close the display to inform Xt that it doesn't 11266 /* We have to close the display to inform Xt that it doesn't
@@ -11279,7 +11279,15 @@ x_connection_closed (display, error_message)
11279 in OpenWindows. I don't know how to cicumvent it here. */ 11279 in OpenWindows. I don't know how to cicumvent it here. */
11280 11280
11281#ifdef USE_X_TOOLKIT 11281#ifdef USE_X_TOOLKIT
11282 XtCloseDisplay (display); 11282 {
11283 /* Prevent being called recursively because of an error condition
11284 in XtCloseDisplay. Otherwise, we might end up with printing
11285 ``can't find per display information'' in the recursive call
11286 instead of printing the original message here. */
11287 int count = x_catch_errors (dpy);
11288 XtCloseDisplay (dpy);
11289 x_uncatch_errors (dpy, count);
11290 }
11283#endif 11291#endif
11284 11292
11285 /* Indicate that this display is dead. */ 11293 /* Indicate that this display is dead. */