Mercurial > emacs
comparison src/xterm.c @ 14489:9bc700f13f97
(x_connection_signal): Call x_connection_closed properly.
(x_connection_closed): Set FRAME_X_DISPLAY to 0.
(x_destroy_window): Don't do any X operations if FRAME_X_DISPLAY is 0.
(x_term_init): Use "" as 2nd arg to setlocale.
(x_connection_signal): Don't stop polling.
Don't mess with SIGALRM.
Those were relics of the superseded Dec 19 change.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 04 Feb 1996 20:24:09 +0000 |
parents | bac274f178b0 |
children | 9cee3e7c6468 |
comparison
equal
deleted
inserted
replaced
14488:4deac8b4941c | 14489:9bc700f13f97 |
---|---|
4513 TOTALLY_UNBLOCK_INPUT; | 4513 TOTALLY_UNBLOCK_INPUT; |
4514 | 4514 |
4515 if (_Xdebug) | 4515 if (_Xdebug) |
4516 abort (); | 4516 abort (); |
4517 | 4517 |
4518 /* Indicate that this display is dead. */ | |
4519 | |
4520 dpyinfo->display = 0; | |
4521 | |
4518 /* First delete frames whose minibuffers are on frames | 4522 /* First delete frames whose minibuffers are on frames |
4519 that are on the dead display. */ | 4523 that are on the dead display. */ |
4520 FOR_EACH_FRAME (tail, frame) | 4524 FOR_EACH_FRAME (tail, frame) |
4521 { | 4525 { |
4522 Lisp_Object minibuf_frame; | 4526 Lisp_Object minibuf_frame; |
4627 x_connection_signal (signalnum) /* If we don't have an argument, */ | 4631 x_connection_signal (signalnum) /* If we don't have an argument, */ |
4628 int signalnum; /* some compilers complain in signal calls. */ | 4632 int signalnum; /* some compilers complain in signal calls. */ |
4629 { | 4633 { |
4630 x_connection_signal_dpyinfo = x_display_list; | 4634 x_connection_signal_dpyinfo = x_display_list; |
4631 | 4635 |
4632 stop_polling (); | |
4633 sigunblock (SIGPIPE); | 4636 sigunblock (SIGPIPE); |
4634 | 4637 |
4635 while (x_connection_signal_dpyinfo) | 4638 while (x_connection_signal_dpyinfo) |
4636 { | 4639 { |
4637 signal (SIGPIPE, x_connection_signal_1); | 4640 signal (SIGPIPE, x_connection_signal_1); |
4638 signal (SIGALRM, x_connection_signal_1); | |
4639 | 4641 |
4640 #ifdef SOLARIS2 | 4642 #ifdef SOLARIS2 |
4641 #ifdef XlibDisplayWriting | 4643 #ifdef XlibDisplayWriting |
4642 /* If the thread-interlock is locked, assume this connection is dead. | 4644 /* If the thread-interlock is locked, assume this connection is dead. |
4643 This assumes that the library does not make other threads | 4645 This assumes that the library does not make other threads |
4644 that can be locking the display legitimately. */ | 4646 that can be locking the display legitimately. */ |
4645 if (x_connection_signal_dpyinfo->display->flags & XlibDisplayWriting) | 4647 if (x_connection_signal_dpyinfo->display->flags & XlibDisplayWriting) |
4646 x_connection_closed (x_connection_signal_dpyinfo, | 4648 { |
4647 "connection was lost"); | 4649 x_connection_signal_dpyinfo->display->flags &= ~XlibDisplayWriting; |
4650 x_connection_closed (x_connection_signal_dpyinfo->display, | |
4651 "connection was lost"); | |
4652 } | |
4648 #endif | 4653 #endif |
4649 #endif | 4654 #endif |
4650 | 4655 |
4651 XNoOp (x_connection_signal_dpyinfo->display); | 4656 XNoOp (x_connection_signal_dpyinfo->display); |
4652 | 4657 |
5537 { | 5542 { |
5538 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 5543 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
5539 | 5544 |
5540 BLOCK_INPUT; | 5545 BLOCK_INPUT; |
5541 | 5546 |
5542 if (f->output_data.x->icon_desc != 0) | 5547 /* If a display connection is dead, don't try sending more |
5543 XDestroyWindow (FRAME_X_DISPLAY (f), f->output_data.x->icon_desc); | 5548 commands to the X server. */ |
5544 XDestroyWindow (FRAME_X_DISPLAY (f), f->output_data.x->window_desc); | 5549 if (dpyinfo->display != 0) |
5550 { | |
5551 if (f->output_data.x->icon_desc != 0) | |
5552 XDestroyWindow (FRAME_X_DISPLAY (f), f->output_data.x->icon_desc); | |
5553 XDestroyWindow (FRAME_X_DISPLAY (f), f->output_data.x->window_desc); | |
5545 #ifdef USE_X_TOOLKIT | 5554 #ifdef USE_X_TOOLKIT |
5546 XtDestroyWidget (f->output_data.x->widget); | 5555 XtDestroyWidget (f->output_data.x->widget); |
5547 free_frame_menubar (f); | 5556 free_frame_menubar (f); |
5548 #endif /* USE_X_TOOLKIT */ | 5557 #endif /* USE_X_TOOLKIT */ |
5549 | 5558 |
5550 free_frame_faces (f); | 5559 free_frame_faces (f); |
5551 XFlush (FRAME_X_DISPLAY (f)); | 5560 XFlush (FRAME_X_DISPLAY (f)); |
5561 } | |
5552 | 5562 |
5553 xfree (f->output_data.x); | 5563 xfree (f->output_data.x); |
5554 f->output_data.x = 0; | 5564 f->output_data.x = 0; |
5555 if (f == dpyinfo->x_focus_frame) | 5565 if (f == dpyinfo->x_focus_frame) |
5556 dpyinfo->x_focus_frame = 0; | 5566 dpyinfo->x_focus_frame = 0; |
5860 x_initialize (); | 5870 x_initialize (); |
5861 x_initialized = 1; | 5871 x_initialized = 1; |
5862 } | 5872 } |
5863 | 5873 |
5864 #ifdef HAVE_X_I18N | 5874 #ifdef HAVE_X_I18N |
5865 setlocale (LC_ALL, NULL); | 5875 setlocale (LC_ALL, ""); |
5866 #endif | 5876 #endif |
5867 | 5877 |
5868 #ifdef USE_X_TOOLKIT | 5878 #ifdef USE_X_TOOLKIT |
5869 /* weiner@footloose.sps.mot.com reports that this causes | 5879 /* weiner@footloose.sps.mot.com reports that this causes |
5870 errors with X11R5: | 5880 errors with X11R5: |