After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 142947 - alt-tab popup and ctrl-alt-arrow popups remain up
alt-tab popup and ctrl-alt-arrow popups remain up
Status: RESOLVED NOTGNOME
Product: metacity
Classification: Other
Component: general
2.8.x
Other Linux
: High minor
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
: 143038 145032 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-05-22 03:09 UTC by Elijah Newren
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6


Attachments
Mini-trace of function names and variables showing how the bug occurs (1.68 KB, text/plain)
2004-05-22 03:11 UTC, Elijah Newren
Details

Description Elijah Newren 2004-05-22 03:09:58 UTC
I searched gnome bugzilla and couldn't find this reported elsewhere;  I also
searched Red Hat bugzilla and found
  http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=122752
but I'm filing it here as there's no patches in Fedora 2's version of Metacity
(2.8.1) that I believe could possibly cause this problem.  I have investigated
and found out some more detail as well...

To reproduce the alt-tab problem:
1. Press and hold the *right* alt key
2. Press and release the tab key
3. Release the right alt key

To reproduce the Ctrl-alt-arrow problem:
1. Press and hold either ctrl key
2. Press and hold the *right* alt key
3. Press and release any of the arrow keys
4. Release both the alt and ctrl keys

If I instead use the left alt key, this problem does not occur.  I added some
meta_warning's to the code to print out the function that was running and
important variables in it in order to try to figure out what was happening. 
It's a short text file, but some of the lines are long so I'll attach it rather
than let bugzilla screw up the lines.

When I add the line
  if (keycode == 0x71) return TRUE;
near the beginning of keybindings.c's is_specific_modifier function, this
problem goes away (note that 0x71 is the keycode for the right alt key for me).
It seems like I'm close to finding the root problem if I at least have this ugly
hack that works, but I really don't understand is_specific_modifier or
reload_modmap.  I don't know whether it's because I have no Xlib manuals and
Google only turns up sucky manuals, or if I'm just incredibly dense (or both). 
Any guidance on how to track this down would be appreciated...
Comment 1 Elijah Newren 2004-05-22 03:11:18 UTC
Created attachment 27924 [details]
Mini-trace of function names and variables showing how the bug occurs
Comment 2 Elijah Newren 2004-05-22 14:14:09 UTC
After continuing to fight with this, I finally tried the following:
  1. Attempt to duplicate under Fedora 1 (uses Metacity-2.6.3) -- FAILED
  2. Compile the metacity srpm from Fedora 1 under Fedora 2 and try to
     duplicate -- SUCCESS

So, metacity-2.6.3 only shows this bug if I'm on Fedora 2.  That makes me
believe that this is either an xorg bug, or a subtle metacity bug that XFree86
let slide whereas xorg won't.  I don't grok X and get lost in tracing the bug
down in the Metacity code once it gets to X calls, so if I could get an expert
opinion on what to do with this bug, I'd appreciate it...
Comment 3 Havoc Pennington 2004-05-22 20:12:29 UTC
A quick thing to check is whether "xmodmap" outputs something different on FC1
vs. FC2 configuration.

is_specific_modifier() is looking for the given keycode associated with the
given modifier bit. There are 8 modifier bits (shift, lock, control, mod1-5).
mod1 is required to be Alt (though you can screw this up with xmodmap if you like). 
xmodmap output shows the list of keysyms/keycodes bound to each modifier. If you
check the xmodmap source code it will probably look a lot like
is_specific_modifier().

The modifier map is a flat array of keycodes, where there are max_keypermod
array entries for each of the 8 modifiers. mod_index in is_specific_modifier()
is the index of the modifier (0-7).

Hopefully that gets you started, let me know.

Comment 4 Elijah Newren 2004-05-24 02:01:57 UTC
Yes, xmodmap does return different results on the two machines.  On the machine
with FC2, "xmodmap | grep mod1" returns
  mod1        Alt_L (0x40),  Alt_L (0x7d),  Meta_L (0x9c)

Alt_R is conspicuously missing from the list.  A simple
  xmodmap -e "add mod1 = Alt_R"
will fix this and get rid of the "remaining-popup" problem.  It's just a
workaround since you have to run this command everytime you log in, but it's
pretty easy to do (and, unfortunately, it has sort of drained my motivation to
continue investigating it--I know, it's lame, but it's true).

So, I'm guessing I should mark this bug as NOTGNOME?
Comment 5 Havoc Pennington 2004-05-24 14:31:40 UTC
Looks like NOTGNOME, but I'd appreciate a bug vs. the X packages in FC2 ;-)
Comment 6 Elijah Newren 2004-05-24 15:37:46 UTC
Well, you could reassign
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=122752; I'd do that but I
don't have any privileges on RedHat's bugzilla.   ;)
Comment 7 Rob Adams 2004-05-24 15:42:13 UTC
Clearly the solution here is to just use Debian.
Comment 8 Havoc Pennington 2004-05-24 17:43:00 UTC
Thanks, I reassigned the Red Hat bug.
Comment 9 Elijah Newren 2004-06-27 04:00:02 UTC
*** Bug 145032 has been marked as a duplicate of this bug. ***
Comment 10 Elijah Newren 2004-07-13 19:06:49 UTC
*** Bug 143038 has been marked as a duplicate of this bug. ***