Comment 37 for bug 486154

Revision history for this message
Grondr (grondr) wrote :

Oy.

I know this is probably going to be an unpopular discovery, but I am no longer sure this is necessarily a metacity bug. The problem is, then, whose bug -is- it?

I just spent a couple hours hacking around in the metacity source code doing things like commenting out XkbSelectEvents and XkbChangeEnabledControls calls in core/bell.c's meta_bell_init, and finally going so far as to #undef HAVE_XKB in that file and display.c. I could pretty easily cause backspace on an empty line to emit -nothing- (on either the motherboard speaker or line-out), but I couldn't get the functionality I wanted (namely, the old functionality of X bell on motherboard speaker). [Obviously you have to killall metacity & restart it and/or log out & in to see changes, etc.]

Finally it occurred to me to just rename /usr/bin/metacity to a random name, log out, and then log in again. I got an endless spinny cursor because something was trying but failing to start the metacity process, but could still start a terminal window and still got silence on empty-line backspace. [The "beep" command works as always, but that's a completely different mechanism, etc.] I also tried this from a cold-boot, just in case; same behavior.

So while it looks like metacity can correctly snarf up X events so you can get -some- sort of bell, something other than metacity is grabbing and/or killing them, since even if metacity isn't running, there's no bell of any sort on an empty line (and presumably xkbbell would also be silent; i didn't test it). Yet this works without X and in an xterm started via xinit (see my giant table), so what's stealing these events? Some other part of gnome?

Aargh. But at this point, I don't think I can file a bug against metacity for this, except to cause the metacity developers to maybe point their fingers at the real culprit...

P.S. It -is- disturbing that meta_bell_set_audible is a complete no-op (no lines of code), and the comment in bell.h that meta_bell_shutdown is never called also gives me pause---I wonder if -that- is why I was getting different results based on whether xkbbell had -ever- run, since boot (see my giant table again), which smelled of something failing to clean up its state. But the fact that this seems broken even if metacity had never run makes me think it's not metacity's fault (and I suspect the xkbbell stuff is its own state-restoration issue.)