comparison src/xterm.c @ 10743:6977bff3ff38

(x_display_bar_cursor): Use frame's cursor_width. (x_connection_signal): New function. (x_initialize): Use it as signal handler.
author Richard M. Stallman <rms@gnu.org>
date Tue, 14 Feb 1995 14:22:29 +0000
parents f6a41cb94a75
children e5f13cc95d02
comparison
equal deleted inserted replaced
10742:e4d6f6f1fc17 10743:6977bff3ff38
4125 : SPACEGLYPH); 4125 : SPACEGLYPH);
4126 XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 4126 XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
4127 f->display.x->cursor_gc, 4127 f->display.x->cursor_gc,
4128 CHAR_TO_PIXEL_COL (f, curs_x), 4128 CHAR_TO_PIXEL_COL (f, curs_x),
4129 CHAR_TO_PIXEL_ROW (f, curs_y), 4129 CHAR_TO_PIXEL_ROW (f, curs_y),
4130 1, f->display.x->line_height); 4130 max (f->display.x->cursor_width, 1),
4131 f->display.x->line_height);
4131 4132
4132 f->phys_cursor_x = curs_x; 4133 f->phys_cursor_x = curs_x;
4133 f->phys_cursor_y = curs_y; 4134 f->phys_cursor_y = curs_y;
4134 4135
4135 f->display.x->current_cursor = bar_cursor; 4136 f->display.x->current_cursor = bar_cursor;
4400 #endif 4401 #endif
4401 sigunblock (sigmask (SIGALRM)); 4402 sigunblock (sigmask (SIGALRM));
4402 TOTALLY_UNBLOCK_INPUT; 4403 TOTALLY_UNBLOCK_INPUT;
4403 4404
4404 error ("%s", error_message); 4405 error ("%s", error_message);
4406 }
4407
4408 static SIGTYPE
4409 x_connection_signal (signalnum) /* If we don't have an argument, */
4410 int signalnum; /* some compilers complain in signal calls. */
4411 {
4412 /* We really ought to close the connection to the display
4413 that actually failed.
4414 But do we actually get this signal ever with X11? */
4415 fprintf (stderr, "X connection closed");
4416 shut_down_emacs (0, 0, Qnil);
4417 exit (70);
4405 } 4418 }
4406 4419
4407 /* This is the usual handler for X protocol errors. 4420 /* This is the usual handler for X protocol errors.
4408 It kills all frames on the display that we got the error for. 4421 It kills all frames on the display that we got the error for.
4409 If that was the only one, it prints an error message and kills Emacs. */ 4422 If that was the only one, it prints an error message and kills Emacs. */
5834 /* Disable Window Change signals; they are handled by X events. */ 5847 /* Disable Window Change signals; they are handled by X events. */
5835 #ifdef SIGWINCH 5848 #ifdef SIGWINCH
5836 signal (SIGWINCH, SIG_DFL); 5849 signal (SIGWINCH, SIG_DFL);
5837 #endif /* ! defined (SIGWINCH) */ 5850 #endif /* ! defined (SIGWINCH) */
5838 5851
5839 signal (SIGPIPE, x_connection_closed); 5852 signal (SIGPIPE, x_connection_signal);
5840 } 5853 }
5841 5854
5842 void 5855 void
5843 syms_of_xterm () 5856 syms_of_xterm ()
5844 { 5857 {