# HG changeset patch # User aidan # Date 1148335627 0 # Node ID 168e8d8a55be97343c373824777072106109f01c # Parent aa21e817df76484523d31298d4606ede4b06cab1 [xemacs-hg @ 2006-05-22 22:07:05 by aidan] Fix a hang in read-from-minibuffer if the X display disappears diff -r aa21e817df76 -r 168e8d8a55be src/ChangeLog --- a/src/ChangeLog Mon May 22 21:50:46 2006 +0000 +++ b/src/ChangeLog Mon May 22 22:07:07 2006 +0000 @@ -1,3 +1,10 @@ +2006-05-23 Aidan Kehoe + + * frame-x.c (x_set_frame_properties): + Check that the frame is live and that the device is not being + deleted before attempting anything. Avoids calling X code if + x_IO_error_handler has seen a broken pipe. + 2006-05-22 Aidan Kehoe * file-coding.c (output_bytes_in_ascii_and_hex): diff -r aa21e817df76 -r 168e8d8a55be src/frame-x.c --- a/src/frame-x.c Mon May 22 21:50:46 2006 +0000 +++ b/src/frame-x.c Mon May 22 22:07:07 2006 +0000 @@ -745,7 +745,14 @@ Bool y_position_specified_p = False; Bool internal_border_width_specified = False; Lisp_Object tail; - Widget w = FRAME_X_TEXT_WIDGET (f); + Widget w; + + /* We can be called after the X IO error handler has seen a broken pipe on + the relevant display. Don't do anything in that case. */ + if (!FRAME_LIVE_P (f) || DEVICE_X_BEING_DELETED (XDEVICE (FRAME_DEVICE (f)))) + return; + + w = FRAME_X_TEXT_WIDGET (f); for (tail = plist; !NILP (tail); tail = Fcdr (Fcdr (tail))) {