GNOME Bugzilla – Bug 576447
Keyboard not working inside Profile editor
Last modified: 2009-07-29 01:30:26 UTC
Cannot type anything into the Gnome session running inside Profile editor (Xephyr). 1. Edit some profile in Sabayon, wait until Profile editor and the Gnome session inside starts 2. Run gedit inside and try to type anything 3. None of the keys are working, you can't even select another icon by arrows on the desktop (nautilus) Looks like keys aren't stuck, switching to text mode and back doesn't help. Got these messages on console (extra debugging turned on): Resending key release; keycode = 0x17, state = 0x10 Resending key press; keycode = 0x26, state = 0x10 Resending key release; keycode = 0x26, state = 0x10 Resending key press; keycode = 0x2b, state = 0x10 Resending key release; keycode = 0x2b, state = 0x10 Resending key press; keycode = 0x20, state = 0x10 Resending key release; keycode = 0x20, state = 0x10 Resending key press; keycode = 0x2c, state = 0x10 Resending key release; keycode = 0x2c, state = 0x10 ... Fedora rawhide, Gnome 2.26, running Xfce4 session (shouldn't make any difference) sabayon-2.25.0-1.fc11 xorg-x11-server-Xephyr-1.6.0-9.fc11
Caused by Xephyr, Xnest works as expected. Probably related to the fact that Xephyr is real X server instead of Xnest being just a X proxy. Don't know how to fix that yet.
Huh, does Sabayon use Xephyr in Fedora? The default uses Xnest... I'd love to switch to Xephyr in general; it's a much better X server than Xnest. Under Xnest, I also get a non-working keyboard. Lowercase letters work, but "e" produces a currency sign. Modifier keys don't work. I have no idea of how to fix this :(
Does Xephyr reject synthetic events or something like that?
No, from a quick look at the Xephyr code, it doesn't ignore synthetic events. I wonder if it is getting the events at all... (Although see the "this is pretty broken" comment in ephyrUpdateModifierState()...)
I finally finished fixing this in commit f61a4f5ea8e318af4994b397ac491b2befced84f and the ones before it. "Xephyr -parent XID" creates a subwindow inside the specified parent window, and uses that to draw and get events. Contrast this to Xnest, whose -parent option makes it use the actual window you specify. With my fix, Sabayon now detects when Xephyr creates its subwindow, and forwards events to it.