X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ioncore%2Fkey.c;h=8675b8ce475f4663fb0b89954d317a498ae90bac;hb=e3aec18706513a87eaa7839dfdaf7e0fcd0d8d2a;hp=4134ab77f2abdd158181472e9ff471d38613b5cb;hpb=ae4260bb64817c11f9a7140324cd3e3ba113e297;p=ion3.git diff --git a/ioncore/key.c b/ioncore/key.c index 4134ab7..8675b8c 100644 --- a/ioncore/key.c +++ b/ioncore/key.c @@ -1,7 +1,7 @@ /* * ion/ioncore/key.c * - * Copyright (c) Tuomo Valkonen 1999-2007. + * Copyright (c) Tuomo Valkonen 1999-2009. * * See the included file LICENSE for details. */ @@ -223,7 +223,7 @@ bool ioncore_current_key(uint *kcb, uint *state, bool *sub) } -enum{GRAB_NONE, GRAB_SUBMAP, GRAB_WAITRELEASE}; +enum{GRAB_NONE, GRAB_NONE_SUBMAP, GRAB_SUBMAP, GRAB_WAITRELEASE}; static WBinding *lookup_binding_(WRegion *reg, @@ -316,7 +316,7 @@ static int do_key(WRegion *oreg, XKeyEvent *ev) oreg->submapstat, &binding_owner, &subreg); - ret=(grabbed ? GRAB_SUBMAP : GRAB_NONE); + ret=(grabbed ? GRAB_SUBMAP : GRAB_NONE_SUBMAP); } }else{ call=binding; @@ -403,6 +403,8 @@ void ioncore_do_handle_keypress(XKeyEvent *ev) submapgrab(reg); else if(grab==GRAB_WAITRELEASE) waitrelease(reg); + else if(grab==GRAB_NONE_SUBMAP) + /* nothing */; else if(grab==GRAB_NONE && reg->submapstat!=NULL) clear_subs(reg); }