emacs-diffs
[Top][All Lists]
Advanced

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

master 1b20c4eaa2 1/2: Fix detection of Meta key in some cases


From: Po Lu
Subject: master 1b20c4eaa2 1/2: Fix detection of Meta key in some cases
Date: Tue, 12 Apr 2022 09:30:37 -0400 (EDT)

branch: master
commit 1b20c4eaa2e5befc4c500637332c3bc1b719cf47
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix detection of Meta key in some cases
    
    * src/xterm.c (x_find_modifier_meanings): Set found_meta_p
    correctly.
---
 src/xterm.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index 12707fc9a2..e922ab8fbb 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -9883,6 +9883,7 @@ x_find_modifier_meanings (struct x_display_info *dpyinfo)
 #ifdef HAVE_XKB
   int i;
   int found_meta_p = false;
+  uint vmodmask;
 #endif
 
   dpyinfo->meta_mod_mask = 0;
@@ -9897,12 +9898,14 @@ x_find_modifier_meanings (struct x_display_info 
*dpyinfo)
     {
       for (i = 0; i < XkbNumVirtualMods; i++)
        {
-         uint vmodmask = dpyinfo->xkb_desc->server->vmods[i];
+         vmodmask = dpyinfo->xkb_desc->server->vmods[i];
 
          if (dpyinfo->xkb_desc->names->vmods[i] == dpyinfo->Xatom_Meta)
            {
              dpyinfo->meta_mod_mask |= vmodmask;
-             found_meta_p = vmodmask;
+
+             if (vmodmask)
+               found_meta_p = true;
            }
          else if (dpyinfo->xkb_desc->names->vmods[i] == dpyinfo->Xatom_Alt)
            dpyinfo->alt_mod_mask |= vmodmask;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]