]> Dogcows Code - chaz/openbox/blobdiff - openbox/actions/desktop.c
make control keys work in menus/dialogs/etc with the new obt code, using XLookup...
[chaz/openbox] / openbox / actions / desktop.c
index 59aae832d4c2cad27c561f60540770f021b02422..6c30d56de3fb9e28df54e36d4bc358c8083a2bb0 100644 (file)
@@ -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))
This page took 0.021677 seconds and 4 git commands to generate.