* src/xmenu.c (x_activate_menubar): Clear flag if dispatching
the event failed.
* src/xterm.c (handle_one_xevent): Check for sensitive
CascadeButton instead of row column type.
}
}
#endif
- XtDispatchEvent (f->output_data.x->saved_menu_event);
+ /* The cascade button might have been deleted, so don't activate the
+ popup if it no widget was found to dispatch to. */
+ popup_activated_flag
+ = XtDispatchEvent (f->output_data.x->saved_menu_event);
#endif
unblock_input ();
#ifdef USE_MOTIF
#include <Xm/Xm.h>
+#include <Xm/CascadeB.h>
#endif
#ifdef USE_X_TOOLKIT
&& event->xbutton.same_screen)
{
#ifdef USE_MOTIF
- unsigned char column_type;
Widget widget;
widget = XtWindowToWidget (dpyinfo->display,
event->xbutton.window);
- XtVaGetValues (widget, XmNrowColumnType, &column_type, NULL);
- if (column_type != XmMENU_BAR)
+ if (widget && XmIsCascadeButton (widget)
+ && XtIsSensitive (widget))
{
#endif
if (!f->output_data.x->saved_menu_event)