keygrabber: change key_press_lookup_string proto

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-04-29 10:36:48 +02:00
parent 30821f80a9
commit ba48d8784d
1 changed files with 4 additions and 3 deletions

View File

@ -635,11 +635,12 @@ keysym_to_xkb(char *buf, ssize_t len, const xcb_keysym_t ksym)
#undef CASE
static bool
key_press_lookup_string(xcb_key_press_event_t *e,
key_press_lookup_string(uint16_t state,
xcb_keycode_t detail,
char *buf, ssize_t buf_len,
xcb_keysym_t *ksym)
{
*ksym = key_getkeysym(e->detail, e->state);
*ksym = key_getkeysym(detail, state);
/* Handle special KeySym (Tab, Newline...) */
if((*ksym & 0xffffff00) == 0xff00)
@ -689,7 +690,7 @@ keygrabber_handlekpress(lua_State *L, xcb_key_press_event_t *e)
xcb_keysym_t ksym = 0;
char buf[MAX(MB_LEN_MAX, 32)];
if(!key_press_lookup_string(e, buf, countof(buf), &ksym))
if(!key_press_lookup_string(e->state, e->detail, buf, countof(buf), &ksym))
return false;
luaA_pushmodifiers(L, e->state);