]> code.delx.au - gnu-emacs/commitdiff
* xterm.c (x_set_window_size): Call change_frame_size instead of
authorJim Blandy <jimb@redhat.com>
Sun, 14 Feb 1993 14:40:55 +0000 (14:40 +0000)
committerJim Blandy <jimb@redhat.com>
Sun, 14 Feb 1993 14:40:55 +0000 (14:40 +0000)
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.

src/xterm.c

index 839ba6d70267d3d94fdbf2b3b1a146b5687d2f3e..8ac66499ca0fc659e0454a1eeb49b429c9b2408d 100644 (file)
@@ -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