Mercurial > hg > xemacs-beta
diff src/frame.c @ 96:dbb370e3c29e r20-0final
Import from CVS: tag r20-0final
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:12:40 +0200 |
parents | 821dec489c24 |
children | 0d2f883870bc |
line wrap: on
line diff
--- a/src/frame.c Mon Aug 13 09:12:11 2007 +0200 +++ b/src/frame.c Mon Aug 13 09:12:40 2007 +0200 @@ -1278,6 +1278,29 @@ } } + /* Test for popup frames hanging around. */ + /* Deletion of a parent frame with popups is deadly. */ + { + Lisp_Object frmcons, devcons, concons; + + FRAME_LOOP_NO_BREAK (frmcons, devcons, concons) + { + Lisp_Object this = XCAR (frmcons); + + + if (! EQ (this, frame) + && EQ (frame, DEVMETH_OR_GIVEN(XDEVICE(XCAR(devcons)), + get_frame_parent, + (XFRAME(this)), + Qnil))) + { + /* We've found a popup frame whose parent is this frame. */ + signal_simple_error + ("Attempt to delete a frame with live popups", frame); + } + } + } + /* Before here, we haven't made any dangerous changes (just checked for error conditions). Now run the delete-frame-hook. Remember that user code there could do any number of dangerous things, including