all_lock_mask miscomputed (when changing keymaps), patch suggestion

in file src/key.c, we have these variables, and they are initialized to 0 (right?):

static u_long num_lock_mod, scroll_lock_mod;

That's ok. But imagine changing the keymap later, for exmaple where we don't have a
scrollLock modifier.

I suggest, at the beginning of find_meta(void), right after variable declarations:

/* new keymap set, forget the previous values: */
   scroll_lock_mod = 0;
   num_lock_mod = 0;
   super_mod = 0;
   alt_mod = 0;
   hyper_mod = 0;
   meta_mod = 0;
/* --------------- */

b/c if some of the modifier keys are not found (after i invoke a new X keymap)
the old values still persisist and  pollute the computation in  build_lock_mods

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]