X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fdevice-x.c;h=540e407c6aa098e52bfdd59a38f08356ed044480;hb=8b6b965da075da197b3d654db3405aa6846bd3d8;hp=4bfa4b0eb77bd9e6e0315fa3eb89963b6bd1dbbe;hpb=d8654f7c5ad0c04060008c6fbbd90add1f4537e3;p=chise%2Fxemacs-chise.git.1 diff --git a/src/device-x.c b/src/device-x.c index 4bfa4b0..540e407 100644 --- a/src/device-x.c +++ b/src/device-x.c @@ -141,7 +141,7 @@ get_device_from_display (Display *dpy) (STRINGP (Vinvocation_name) ? (char *) XSTRING_DATA (Vinvocation_name) : FALLBACK_RESOURCE_NAME), DisplayString (dpy) ? DisplayString (dpy) : "???"); - abort(); + ABORT(); } #undef FALLBACK_RESOURCE_NAME @@ -420,7 +420,7 @@ x_get_visual_depth (Display *dpy, Visual *visual) vi_in.visualid = XVisualIDFromVisual (visual); vi_out = XGetVisualInfo (dpy, /*VisualScreenMask|*/VisualIDMask, &vi_in, &out_count); - if (! vi_out) abort (); + if (! vi_out) ABORT (); d = vi_out [0].depth; XFree ((char *) vi_out); return d; @@ -1057,10 +1057,14 @@ x_error_handler (Display *disp, XErrorEvent *event) } #endif /* EXTERNAL_WIDGET */ +#if 0 + /* This ends up calling X, which isn't allowed in an X error handler + */ stderr_out ("\n%s: ", (STRINGP (Vinvocation_name) ? (char *) XSTRING_DATA (Vinvocation_name) : "xemacs")); +#endif XmuPrintDefaultErrorMessage (disp, event, stderr); } return 0; @@ -1157,8 +1161,10 @@ x_IO_error_handler (Display *disp) Xlib might just decide to exit(). So we mark the offending console for deletion and throw to top level. */ if (d) - enqueue_magic_eval_event (io_error_delete_device, dev); - DEVICE_X_BEING_DELETED (d) = 1; + { + enqueue_magic_eval_event (io_error_delete_device, dev); + DEVICE_X_BEING_DELETED (d) = 1; + } Fthrow (Qtop_level, Qnil); return 0; /* not reached */