aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2011-02-03 14:46:03 +0100
committerJan Djärv2011-02-03 14:46:03 +0100
commit36941b32f3a3cd332b3adaf0cc8178177c2e9166 (patch)
tree24e5c25f4cb2b7d78940a5a471765578e74ba9bd /src
parenta857d3c7c05062e9a0916b4894e4d82e95f9e7ef (diff)
downloademacs-36941b32f3a3cd332b3adaf0cc8178177c2e9166.tar.gz
emacs-36941b32f3a3cd332b3adaf0cc8178177c2e9166.zip
* xterm.c (x_connection_closed): Remove all calls that calls XSync.
Fixes: debbugs:7949
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xterm.c31
2 files changed, 8 insertions, 28 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 74165302824..aee41f57ac2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12011-02-03 Jan Djärv <jan.h.d@swipnet.se>
2
3 * xterm.c (x_connection_closed): Remove all calls that calls
4 XSync (Bug#7949).
5
12011-02-01 Eli Zaretskii <eliz@gnu.org> 62011-02-01 Eli Zaretskii <eliz@gnu.org>
2 7
3 * image.c (tiff_load): Avoid compiler warning in 2nd arg to 8 * image.c (tiff_load): Avoid compiler warning in 2nd arg to
diff --git a/src/xterm.c b/src/xterm.c
index 936a5f6b24e..92612507903 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7694,12 +7694,6 @@ x_connection_closed (Display *dpy, const char *error_message)
7694 strcpy (error_msg, error_message); 7694 strcpy (error_msg, error_message);
7695 handling_signal = 0; 7695 handling_signal = 0;
7696 7696
7697 /* Prevent being called recursively because of an error condition
7698 below. Otherwise, we might end up with printing ``can't find per
7699 display information'' in the recursive call instead of printing
7700 the original message here. */
7701 x_catch_errors (dpy);
7702
7703 /* Inhibit redisplay while frames are being deleted. */ 7697 /* Inhibit redisplay while frames are being deleted. */
7704 specbind (Qinhibit_redisplay, Qt); 7698 specbind (Qinhibit_redisplay, Qt);
7705 7699
@@ -7742,26 +7736,9 @@ x_connection_closed (Display *dpy, const char *error_message)
7742 first place, so don't try to close it. */ 7736 first place, so don't try to close it. */
7743 if (dpyinfo) 7737 if (dpyinfo)
7744 { 7738 {
7745#ifdef USE_X_TOOLKIT 7739 /* We can not call XtCloseDisplay here because it calls XSync.
7746 /* We have to close the display to inform Xt that it doesn't 7740 XSync inside the error handler apparently hangs Emacs. On
7747 exist anymore. If we don't, Xt will continue to wait for 7741 current Xt versions, this isn't needed either. */
7748 events from the display. As a consequence, a sequence of
7749
7750 M-x make-frame-on-display RET :1 RET
7751 ...kill the new frame, so that we get an IO error...
7752 M-x make-frame-on-display RET :1 RET
7753
7754 will indefinitely wait in Xt for events for display `:1',
7755 opened in the first call to make-frame-on-display.
7756
7757 Closing the display is reported to lead to a bus error on
7758 OpenWindows in certain situations. I suspect that is a bug
7759 in OpenWindows. I don't know how to circumvent it here. */
7760 fatal_error_signal_hook = x_fatal_error_signal;
7761 XtCloseDisplay (dpy);
7762 fatal_error_signal_hook = NULL;
7763#endif /* USE_X_TOOLKIT */
7764
7765#ifdef USE_GTK 7742#ifdef USE_GTK
7766 /* A long-standing GTK bug prevents proper disconnect handling 7743 /* A long-standing GTK bug prevents proper disconnect handling
7767 (https://bugzilla.gnome.org/show_bug.cgi?id=85715). Once, 7744 (https://bugzilla.gnome.org/show_bug.cgi?id=85715). Once,
@@ -7792,8 +7769,6 @@ For details, see etc/PROBLEMS.\n",
7792 } 7769 }
7793 } 7770 }
7794 7771
7795 x_uncatch_errors ();
7796
7797 if (terminal_list == 0) 7772 if (terminal_list == 0)
7798 { 7773 {
7799 fprintf (stderr, "%s\n", error_msg); 7774 fprintf (stderr, "%s\n", error_msg);