]> git.decadent.org.uk Git - ion3.git/blobdiff - ioncore/binding.c
Add 20080207-1.
[ion3.git] / ioncore / binding.c
index 7b80d111776d7572a29d9d8afc7784b2dd17badd..5ca284ddb157cfeaa71ef5d219781f5f80aa15a3 100644 (file)
@@ -1,12 +1,9 @@
 /*
  * ion/ioncore/binding.c
  *
- * Copyright (c) Tuomo Valkonen 1999-2007
+ * Copyright (c) Tuomo Valkonen 1999-2008
  *
- * Ion is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
+ * See the included file LICENSE for details.
  */
 
 #include <string.h>
@@ -384,7 +381,7 @@ void binding_grab_on(const WBinding *binding, Window win)
        binding->act!=BINDING_BUTTONMOTION)
         return;
     
-    if(binding->state==0)
+    if(binding->state==0 || binding->area!=0)
         return;
     
 #ifndef CF_HACK_IGNORE_EVIL_LOCKS
@@ -415,7 +412,7 @@ void binding_ungrab_on(const WBinding *binding, Window win)
        binding->act!=BINDING_BUTTONMOTION)
         return;
     
-    if(binding->state==0)
+    if(binding->state==0 || binding->area!=0)
         return;
 
 #ifndef CF_HACK_IGNORE_EVIL_LOCKS
@@ -486,6 +483,11 @@ static WBinding *do_bindmap_lookup_binding(WBindmap *bindmap,
     
     binding=search_binding(bindmap, &tmp);
 
+    if(BINDING_IS_PSEUDO(act)){
+        /* No use trying anything else */
+        return binding;
+    }
+    
     if(binding==NULL){
         tmp.state=AnyModifier;
         binding=search_binding(bindmap, &tmp);