From 096dad0c6c027100494ede811b33cb8558d32e25 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 11 Feb 2010 15:05:16 -0500 Subject: make control keys work in menus/dialogs/etc with the new obt code, using XLookup stuff --- openbox/actions/desktop.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'openbox/actions/desktop.c') diff --git a/openbox/actions/desktop.c b/openbox/actions/desktop.c index a2d4be29..6c30d56d 100644 --- a/openbox/actions/desktop.c +++ b/openbox/actions/desktop.c @@ -312,17 +312,15 @@ static gboolean i_input_func(guint initial_state, } if (e->type == KeyPress) { + KeySym sym = obt_keyboard_keypress_to_keysym(e); + /* Escape cancels no matter what */ - if (ob_keycode_match(e->xkey.keycode, OB_KEY_ESCAPE)) { + if (sym == XK_Escape) return FALSE; - } /* There were no modifiers and they pressed enter */ - else if (ob_keycode_match(e->xkey.keycode, OB_KEY_RETURN) && - !initial_state) - { + else if (sym == XK_Return && !initial_state) return FALSE; - } } /* They released the modifiers */ else if (e->type == KeyRelease && initial_state && !(mods & initial_state)) -- cgit v1.2.3