diff options
| author | Dana Jansens <danakj@orodu.net> | 2008-01-11 18:57:32 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2008-01-11 18:57:32 -0500 |
| commit | 040d344a89f40487de8a1920e0aaeccd93a6a995 (patch) | |
| tree | 03c14b7b496f57d12480a6728cebf7360428bde1 /openbox/event.c | |
| parent | 78cd9bba523f4986413e3aefe87704e9d11cd081 (diff) | |
don't take KeyRelease events for menus until they receive a KeyPress event first. avoid using the key binding used to show the menu to execute something inside it.
Diffstat (limited to 'openbox/event.c')
| -rw-r--r-- | openbox/event.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openbox/event.c b/openbox/event.c index d2cb7567..6b0ecdd7 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1671,6 +1671,8 @@ static gboolean event_handle_menu_keyboard(XEvent *ev) /* 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; @@ -1704,7 +1706,7 @@ static gboolean event_handle_menu_keyboard(XEvent *ev) 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. |
