aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1993-02-14 14:40:55 +0000
committerJim Blandy1993-02-14 14:40:55 +0000
commit8922af5f60b842d3c0af3e81401e7e8aa5aa17cd (patch)
tree5b92a345e8173dbc54e8f2b02a7f1d24de960bbf /src
parentbaaed68ea1dac89858969109bf62a3a22bf34195 (diff)
downloademacs-8922af5f60b842d3c0af3e81401e7e8aa5aa17cd.tar.gz
emacs-8922af5f60b842d3c0af3e81401e7e8aa5aa17cd.zip
* xterm.c (x_set_window_size): Call change_frame_size instead of
just setting the `rows' and `cols' members of the frame, and leaving the window tree in complete disarray. * xterm.c (x_io_error_quitter): New function. (x_error_quitter): Note that this is only used for protocol errors now, not I/O errors. (x_term_init): Set the I/O error handler to x_io_error_quitter.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 839ba6d7026..8ac66499ca0 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3557,9 +3557,9 @@ x_connection_closed ()
3557 exit (70); 3557 exit (70);
3558} 3558}
3559 3559
3560/* An X error handler which prints an error message and then kills Emacs. 3560/* An X error handler which prints an error message and then kills
3561 This is what's normally installed as Xlib's handler for protocol and 3561 Emacs. This is what's normally installed as Xlib's handler for
3562 I/O errors. */ 3562 protocol errors. */
3563static int 3563static int
3564x_error_quitter (display, error) 3564x_error_quitter (display, error)
3565 Display *display; 3565 Display *display;
@@ -3581,6 +3581,23 @@ x_error_quitter (display, error)
3581 x_connection_closed (); 3581 x_connection_closed ();
3582} 3582}
3583 3583
3584/* A handler for X IO errors which prints an error message and then
3585 kills Emacs. This is what is always installed as Xlib's handler
3586 for I/O errors. */
3587static int
3588x_io_error_quitter (display)
3589 Display *display;
3590{
3591 fprintf (stderr, "Connection to X server %s lost.\n",
3592 XDisplayName (DisplayString (display)));
3593
3594 /* While we're testing Emacs 19, we'll just dump core whenever we
3595 get an X error, so we can figure out why it happened. */
3596 abort ();
3597
3598 x_connection_closed ();
3599}
3600
3584/* A buffer for storing X error messages. */ 3601/* A buffer for storing X error messages. */
3585static char (*x_caught_error_message)[200]; 3602static char (*x_caught_error_message)[200];
3586 3603
@@ -3873,8 +3890,7 @@ x_set_window_size (f, cols, rows)
3873 might be kind of confusing to the lisp code, since size changes 3890 might be kind of confusing to the lisp code, since size changes
3874 wouldn't be reported in the frame parameters until some random 3891 wouldn't be reported in the frame parameters until some random
3875 point in the future when the ConfigureNotify event arrives. */ 3892 point in the future when the ConfigureNotify event arrives. */
3876 FRAME_WIDTH (f) = cols; 3893 change_frame_size (f, rows, cols, 0, 0);
3877 FRAME_HEIGHT (f) = rows;
3878 PIXEL_WIDTH (f) = pixelwidth; 3894 PIXEL_WIDTH (f) = pixelwidth;
3879 PIXEL_HEIGHT (f) = pixelheight; 3895 PIXEL_HEIGHT (f) = pixelheight;
3880 3896
@@ -4506,7 +4522,7 @@ x_term_init (display_name)
4506 /* Note that there is no real way portable across R3/R4 to get the 4522 /* Note that there is no real way portable across R3/R4 to get the
4507 original error handler. */ 4523 original error handler. */
4508 XHandleError (x_error_quitter); 4524 XHandleError (x_error_quitter);
4509 XHandleIOError (x_error_quitter); 4525 XHandleIOError (x_io_error_quitter);
4510 4526
4511 /* Disable Window Change signals; they are handled by X events. */ 4527 /* Disable Window Change signals; they are handled by X events. */
4512#ifdef SIGWINCH 4528#ifdef SIGWINCH