Commit 8922af5f authored by Jim Blandy's avatar Jim Blandy

* 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.
parent baaed68e
......@@ -3557,9 +3557,9 @@ x_connection_closed ()
exit (70);
}
/* An X error handler which prints an error message and then kills Emacs.
This is what's normally installed as Xlib's handler for protocol and
I/O errors. */
/* An X error handler which prints an error message and then kills
Emacs. This is what's normally installed as Xlib's handler for
protocol errors. */
static int
x_error_quitter (display, error)
Display *display;
......@@ -3581,6 +3581,23 @@ x_error_quitter (display, error)
x_connection_closed ();
}
/* A handler for X IO errors which prints an error message and then
kills Emacs. This is what is always installed as Xlib's handler
for I/O errors. */
static int
x_io_error_quitter (display)
Display *display;
{
fprintf (stderr, "Connection to X server %s lost.\n",
XDisplayName (DisplayString (display)));
/* While we're testing Emacs 19, we'll just dump core whenever we
get an X error, so we can figure out why it happened. */
abort ();
x_connection_closed ();
}
/* A buffer for storing X error messages. */
static char (*x_caught_error_message)[200];
......@@ -3873,8 +3890,7 @@ x_set_window_size (f, cols, rows)
might be kind of confusing to the lisp code, since size changes
wouldn't be reported in the frame parameters until some random
point in the future when the ConfigureNotify event arrives. */
FRAME_WIDTH (f) = cols;
FRAME_HEIGHT (f) = rows;
change_frame_size (f, rows, cols, 0, 0);
PIXEL_WIDTH (f) = pixelwidth;
PIXEL_HEIGHT (f) = pixelheight;
......@@ -4506,7 +4522,7 @@ x_term_init (display_name)
/* Note that there is no real way portable across R3/R4 to get the
original error handler. */
XHandleError (x_error_quitter);
XHandleIOError (x_error_quitter);
XHandleIOError (x_io_error_quitter);
/* Disable Window Change signals; they are handled by X events. */
#ifdef SIGWINCH
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment