Mercurial > hg > xemacs-beta
diff src/event-stream.c @ 48:56c54cf7c5b6 r19-16b90
Import from CVS: tag r19-16b90
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:56:04 +0200 |
parents | 8d2a9b52c682 |
children | 131b0175ea99 |
line wrap: on
line diff
--- a/src/event-stream.c Mon Aug 13 08:55:32 2007 +0200 +++ b/src/event-stream.c Mon Aug 13 08:56:04 2007 +0200 @@ -1978,11 +1978,28 @@ XCOMMAND_BUILDER (con->command_builder); int store_this_key = 0; struct gcpro gcpro1; +#ifdef LWLIB_MENUBARS_LUCID + extern int in_menu_callback; /* defined in menubar-x.c */ +#endif /* LWLIB_MENUBARS_LUCID */ + GCPRO1 (event); - /* DO NOT do QUIT anywhere within this function or the functions it calls. We want to read the ^G as an event. */ +#ifdef LWLIB_MENUBARS_LUCID + /* + * #### Fix the menu code so this isn't necessary. + * + * We cannot allow the lwmenu code to be reentered, because the + * code is not written to be reentrant and will crash. Therefore + * paths from the menu callbacks back into the menu code have to + * be blocked. Fnext_event is the normal path into the menu code, + * so we signal an error here. + */ + if (in_menu_callback) + error ("Attempt to call next-event inside menu callback"); +#endif /* LWLIB_MENUBARS_LUCID */ + if (NILP (event)) event = Fmake_event (); else