]> git.decadent.org.uk Git - ion3.git/blobdiff - ioncore/key.c
Imported Upstream version 20090110
[ion3.git] / ioncore / key.c
index 4134ab77f2abdd158181472e9ff471d38613b5cb..8675b8ce475f4663fb0b89954d317a498ae90bac 100644 (file)
@@ -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);
         }