Comment 16 for bug 7558

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sun, 12 Sep 2004 23:39:31 +0200
From: <email address hidden> (Denis Barbier)
To: Tim Bagot <email address hidden>, <email address hidden>
Subject: Re: Bug#263073: xlibs: Super still Super+Hyper

--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sun, Sep 12, 2004 at 07:57:56PM +0000, Tim Bagot wrote:
> Sorry, my steps to reproduce weren't exactly very detailed. I'll try
> again:
>
> Sawfish: From Gnome, go to Desktop Preferences, Windows; Bindings tab.
> Set default modifier to super. (Should take effect immediately.) Try
> e.g. Win-TAB. Set to hyper, and try again.
>
> Emacs: Type C-h c Win-<key>

Great, thanks a lot for these detailed instructions.
I was quite surprised to see that Alt and Meta are not corrupted the
same way, and found in emacs21-21.3+1/src/xterm.c l.6442:

  /* If some keys are both alt and meta,
     make them just meta, not alt. */
  if (dpyinfo->alt_mod_mask & dpyinfo->meta_mod_mask)
    {
      dpyinfo->alt_mod_mask &= ~dpyinfo->meta_mod_mask;
    }

It seems that emacs does rely on the assumption that an X modifier
is bound to only one kind of key, and as this is not true for
Alt and Meta, a workaround was added. A similar trick can be added
for Super/Hyper, but a better idea is to skip the newly introduced
fake keys, since emacs has its own views about modifiers.
A patch is attached. It also shows that my patch to fix #234081 was
partly wrong, I will revert it.
On my slow machine, I was not able to build a patched emacs21 package,
but only that this portion behaves as desired with XFree86 4.3.
Emacs maintainer, do you believe that this bug should be cloned and
reassigned to emacs21?

Denis

--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mods.patch"

--- emacs21-21.3+1/src/xterm.c.orig 2004-09-12 20:50:34.000000000 +0000
+++ emacs21-21.3+1/src/xterm.c 2004-09-12 20:52:26.000000000 +0000
@@ -6399,6 +6399,9 @@
        {
   int sym = syms[((code - min_code) * syms_per_code) + code_col];

+ /* Is this a fake key? */
+ if (code_col == 0 && sym == NoSymbol)
+ break;
   switch (sym)
     {
     case XK_Meta_L:

--YiEDa0DAkWCtVeE4--