X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Factions%2Fdesktop.c;h=6c30d56de3fb9e28df54e36d4bc358c8083a2bb0;hb=343ca097f7321983e62cac14791d62e1331d8d87;hp=59aae832d4c2cad27c561f60540770f021b02422;hpb=43d62990e407f409f76f60a405c529f9b15d33f6;p=chaz%2Fopenbox diff --git a/openbox/actions/desktop.c b/openbox/actions/desktop.c index 59aae832..6c30d56d 100644 --- a/openbox/actions/desktop.c +++ b/openbox/actions/desktop.c @@ -43,6 +43,7 @@ static gboolean run_func(ObActionsData *data, gpointer options); static gboolean i_pre_func(guint state, gpointer options); static gboolean i_input_func(guint initial_state, XEvent *e, + ObtIC *ic, gpointer options, gboolean *used); static void i_post_func(gpointer options); @@ -297,6 +298,7 @@ static gboolean run_func(ObActionsData *data, gpointer options) static gboolean i_input_func(guint initial_state, XEvent *e, + ObtIC *ic, gpointer options, gboolean *used) { @@ -310,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))