GNOME Bugzilla – Bug 142947
alt-tab popup and ctrl-alt-arrow popups remain up
Last modified: 2004-12-22 21:47:04 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...
Created attachment 27924 [details] Mini-trace of function names and variables showing how the bug occurs
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...
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.
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?
Looks like NOTGNOME, but I'd appreciate a bug vs. the X packages in FC2 ;-)
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. ;)
Clearly the solution here is to just use Debian.
Thanks, I reassigned the Red Hat bug.
*** Bug 145032 has been marked as a duplicate of this bug. ***
*** Bug 143038 has been marked as a duplicate of this bug. ***