[Sugar-devel] Alt-tab key does not work in F14 and sugar-emulator #2300

Bernie Innocenti bernie at codewiz.org
Thu Oct 7 05:43:24 EDT 2010


On Thu, 2010-10-07 at 09:52 +0200, Simon Schampijer wrote:
> Hi Sascha,
> 
> thanks for your comments.
> 
> On 10/06/2010 03:38 PM, Sascha Silbe wrote:
> > Excerpts from Simon Schampijer's message of Wed Oct 06 15:21:29 +0200 2010:
> >
> >> I have been bumping into [1] [...]
> >
> > Just to avoid confusion: This has nothing to do with how you run Sugar
> > (i.e. it will occur both with sugar-emulator and running Sugar as a
> > "regular" desktop session). It is (according to Bernie - I didn't quite
> > grok the code) a bug in some versions of Xorg and will appear on some
> > distro versions, independent of how you installed Sugar (native distro
> > packages or sugar-jhbuild).
> >
> > It's supposed to be fixed (haven't checked myself yet) in recent Xorg
> > versions. Bernie has also written a patch that lets metacity work around
> > the bug. With that patch applied, "metacity-message disable-keybindings"
> > works fine again.
> 
> Bernie can you give some light on the issue in Xorg and where it has 
> been fixed, if?

For those tuning in just now, the testcase we're trying to fix is
getting Metacity to effectively release keys such as Alt-TAB when
someone executes "metacity-message disable-keybindings" from the
command-line.

This Metacity patch fixed the problem for me on Fedora 11:

  http://people.sugarlabs.org/bernie/patches/gnome/metacity/pending/ungrab-x-keybindings-when-they-are-disabled.patch

It works by making Metacity ungrab each key individually rather than
trying to ungrab them all at once with XUngrabKey(AnyKey, AnyModifier),
which does not seem to work as advertised in the manpage.


> Right, best would be of course to get the Xorg fix in distros. Bernie 
> might have made the metacity workaround with a good reason, though. 
> Let's see, I hope Bernie can point us to the Xorg issue.

I thought the problem had been fixed in the X server by recent commits
to dix/grabs.c:DeletePassiveGrabFromList(), but apparently it's still
there. Now I'm a little confused, because ungrabbing seems to work on at
least some systems. I'm not sure which particular combinations of X
server and Metacity can trigger it.

These are the suspected functions, we still have no incriminating
evidence to declare one them them definitely guilty:

  http://cgit.freedesktop.org/xorg/xserver/tree/dix/grabs.c#n417
  http://git.gnome.org/browse/metacity/tree/src/core/keybindings.c#n737

Perhaps Peter or Owen can shred some light?

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs       - http://sugarlabs.org/



More information about the Sugar-devel mailing list