Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_bindings.c e_int_config_keybindings.c 


Log Message:


numlock binding... WRONG. see comments.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_bindings.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- e_bindings.c        14 Dec 2006 17:52:51 -0000      1.34
+++ e_bindings.c        14 Dec 2006 23:38:33 -0000      1.35
@@ -368,7 +368,9 @@
             if (bind->mod & E_BINDING_MODIFIER_CTRL) mod |= 
ECORE_X_MODIFIER_CTRL;
             if (bind->mod & E_BINDING_MODIFIER_ALT) mod |= 
ECORE_X_MODIFIER_ALT;
             if (bind->mod & E_BINDING_MODIFIER_WIN) mod |= 
ECORE_X_MODIFIER_WIN;
+            /* see comment in e_bindings on numlock
             if (bind->mod & ECORE_X_LOCK_NUM) mod |= ECORE_X_LOCK_NUM;
+             */
             ecore_x_window_key_grab(win, bind->key,
                                     mod, bind->any_mod);
          }
@@ -394,7 +396,9 @@
             if (bind->mod & E_BINDING_MODIFIER_CTRL) mod |= 
ECORE_X_MODIFIER_CTRL;
             if (bind->mod & E_BINDING_MODIFIER_ALT) mod |= 
ECORE_X_MODIFIER_ALT;
             if (bind->mod & E_BINDING_MODIFIER_WIN) mod |= 
ECORE_X_MODIFIER_WIN;
+            /* see comment in e_bindings on numlock
             if (bind->mod & ECORE_X_LOCK_NUM) mod |= ECORE_X_LOCK_NUM;
+             */
             ecore_x_window_key_ungrab(win, bind->key,
                                       mod, bind->any_mod);
          }
@@ -411,7 +415,22 @@
    if (ev->modifiers & ECORE_X_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL;
    if (ev->modifiers & ECORE_X_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT;
    if (ev->modifiers & ECORE_X_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN;
+   /* FIXME: there is a good reason numlock was ignored. sometimes people
+    * have it on, sometimes they don't, and often they have no idea. waaaay
+    * back in E 0.1->0.13 or so days this caused issues thus numlock,
+    * scrollock and capslock are not usable modifiers.
+    * 
+    * if we REALLY want to be able to use numlock we need to add more binding
+    * flags and config that says "REALLY pay attention to numlock for this
+    * binding" field in the binding (like there is a "any_mod" flag - we need a
+    * "num_lock_respect" field)
+    * 
+    * also it should be an E_BINDING_MODIFIER_LOCK_NUM as the ecore lock flag
+    * may vary from system to system as different xservers may have differing
+    * modifier masks for numlock (it is queried at startup).
+    * 
    if (ev->modifiers & ECORE_X_LOCK_NUM) mod |= ECORE_X_LOCK_NUM;
+    */
    for (l = key_bindings; l; l = l->next)
      {
        E_Binding_Key *bind;
@@ -450,7 +469,9 @@
    if (ev->modifiers & ECORE_X_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL;
    if (ev->modifiers & ECORE_X_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT;
    if (ev->modifiers & ECORE_X_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN;
+   /* see comment in e_bindings on numlock
    if (ev->modifiers & ECORE_X_LOCK_NUM) mod |= ECORE_X_LOCK_NUM;
+    */
    for (l = key_bindings; l; l = l->next)
      {
        E_Binding_Key *bind;
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_keybindings.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -3 -r1.46 -r1.47
--- e_int_config_keybindings.c  14 Dec 2006 15:36:09 -0000      1.46
+++ e_int_config_keybindings.c  14 Dec 2006 23:38:33 -0000      1.47
@@ -1037,9 +1037,10 @@
               mod |= E_BINDING_MODIFIER_ALT;
             if (ev->modifiers & ECORE_X_MODIFIER_WIN)
               mod |= E_BINDING_MODIFIER_WIN;
+            /* see comment in e_bindings on numlock
             if (ev->modifiers & ECORE_X_LOCK_NUM) 
               mod |= ECORE_X_LOCK_NUM;
-            
+             */
             if (cfdata->locals.add)
               {
                  found = 0;
@@ -1315,11 +1316,13 @@
        free(l);
      }
 
+   /* see comment in e_bindings on numlock
    if (bi->modifiers & ECORE_X_LOCK_NUM) 
      {
        if (b[0]) strcat(b, " ");
        strcat(b, _("OFF"));
      }
+   */
    
    if (!b[0]) return strdup(TEXT_NONE_ACTION_KEY);
    return strdup(b);



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to