/* Allow control while going thru the menu */
else if (ev->type == KeyPress && (state & ~ControlMask) == 0) {
+ frame->got_press = TRUE;
+
if (keycode == ob_keycode(OB_KEY_ESCAPE)) {
menu_frame_hide_all();
ret = TRUE;
Allow ControlMask only, and don't bother if the menu is empty */
else if (ev->type == KeyRelease && (state & ~ControlMask) == 0 &&
- frame->entries)
+ frame->entries && frame->got_press)
{
if (keycode == ob_keycode(OB_KEY_RETURN)) {
/* Enter runs the active item or goes into the submenu.
RrAppearance *a_title;
RrAppearance *a_items;
+
+ gboolean got_press; /* don't allow a KeyRelease event to run things in the
+ menu until it has seen a KeyPress. this is to
+ avoid having the keybinding used to show the menu
+ end up running something inside the menu */
};
struct _ObMenuEntryFrame