From: Jan Djärv Date: Tue, 5 Oct 2004 10:52:53 +0000 (+0000) Subject: * xterm.c (x_find_modifier_meanings): Ignore any Super or Hyper for X-Git-Tag: ttn-vms-21-2-B4~4716 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b90ee8b5fe3247c345212614877551d41bcbdd98;p=emacs.git * xterm.c (x_find_modifier_meanings): Ignore any Super or Hyper for a row if Alt or Meta has been found for that row. Also stop scanning for Keysyms for that row. --- diff --git a/src/ChangeLog b/src/ChangeLog index 8f6b2297692..b823dbe6f30 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2004-10-05 Jan Dj,Ad(Brv + + * xterm.c (x_find_modifier_meanings): Ignore any Super or Hyper for + a row if Alt or Meta has been found for that row. Also stop scanning + for Keysyms for that row. + 2004-10-04 Kim F. Storm * fringe.c (Ffringe_bitmaps_at_pos): Change return value from cons diff --git a/src/xterm.c b/src/xterm.c index 97e21d1f255..4fc9ed71abd 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3383,12 +3383,14 @@ x_find_modifier_meanings (dpyinfo) Alt keysyms are on. */ { int row, col; /* The row and column in the modifier table. */ + int found_alt_or_meta; for (row = 3; row < 8; row++) + { + found_alt_or_meta = 0; for (col = 0; col < mods->max_keypermod; col++) { - KeyCode code - = mods->modifiermap[(row * mods->max_keypermod) + col]; + KeyCode code = mods->modifiermap[(row * mods->max_keypermod) + col]; /* Zeroes are used for filler. Skip them. */ if (code == 0) @@ -3406,33 +3408,44 @@ x_find_modifier_meanings (dpyinfo) { case XK_Meta_L: case XK_Meta_R: + found_alt_or_meta = 1; dpyinfo->meta_mod_mask |= (1 << row); break; case XK_Alt_L: case XK_Alt_R: + found_alt_or_meta = 1; dpyinfo->alt_mod_mask |= (1 << row); break; case XK_Hyper_L: case XK_Hyper_R: - dpyinfo->hyper_mod_mask |= (1 << row); + if (!found_alt_or_meta) + dpyinfo->hyper_mod_mask |= (1 << row); + code_col = syms_per_code; + col = mods->max_keypermod; break; case XK_Super_L: case XK_Super_R: - dpyinfo->super_mod_mask |= (1 << row); + if (!found_alt_or_meta) + dpyinfo->super_mod_mask |= (1 << row); + code_col = syms_per_code; + col = mods->max_keypermod; break; case XK_Shift_Lock: /* Ignore this if it's not on the lock modifier. */ - if ((1 << row) == LockMask) + if (!found_alt_or_meta && ((1 << row) == LockMask)) dpyinfo->shift_lock_mask = LockMask; + code_col = syms_per_code; + col = mods->max_keypermod; break; } } } } + } } /* If we couldn't find any meta keys, accept any alt keys as meta keys. */