From 08269cefbce2fe600269c989f9a6a22a98641ba1 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 11 Feb 2010 14:17:59 -0500 Subject: make menu input work with the new obt keyboard stuff. create an Input Context for use during keyboard grabs, and use this to translate KeyPress events properly. make the menu respond to KeyPress events, since these are the only ones that can be translated properly, but still execute things from KeyRelease events --- openbox/event.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'openbox/event.c') diff --git a/openbox/event.c b/openbox/event.c index f813d3f5..a4943f46 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1782,6 +1782,9 @@ static gboolean event_handle_menu_input(XEvent *ev) frame->press_keycode = ev->xkey.keycode; frame->press_doexec = FALSE; + unikey = obt_keyboard_keypress_to_unichar(menu_frame_ic(frame), + &ev->xkey); + if (ob_keycode_match(ev->xkey.keycode, OB_KEY_ESCAPE)) { menu_frame_hide_all(); ret = TRUE; @@ -1831,7 +1834,7 @@ static gboolean event_handle_menu_input(XEvent *ev) } /* keyboard accelerator shortcuts. (if it was a valid key) */ - else if ((unikey = obt_keyboard_keypress_to_unichar(&ev->xkey))) { + else if (unikey) { GList *start; GList *it; ObMenuEntryFrame *found = NULL; -- cgit v1.2.3