[PATCH] xkb fixes

Daniel Stone daniel at fooishbar.org
Fri Aug 1 02:58:05 PDT 2008


On Fri, Aug 01, 2008 at 11:37:18AM +0200, Stefan Dirsch wrote:
> On Fri, Aug 01, 2008 at 05:07:08PM +0930, Peter Hutterer wrote:
> > Just in case you haven't completed your daily weeping, please review the
> > attached patches.
> > 
> > The problem we have now is that xkb settings applied with XbkUseCoreKbd
> > only apply to the VCK, but not to the SDs. This can lead to interesting
> > effects, such as keyboard settings getting lost, or the keyboard switcher in
> > gnome not working anymore. 
> > 
> > The attached patches simply rip the core out of the ProcXkbWhatever, move it
> > into a _XkbWhatever, and call the latter repeatedly. Generally, if if
> > ProcXkbWhatever fails on _any_ device, it reports an error to the client
> > before any of the devices are modified - insofar as that was possible.
> > 
> > The same patches can be applied to 1.5, with minimal changes.
> 
> I'm wondering if these patches address any of these Bugs
> 
>  13539 - XKB map setting is bonged
>  16105 - initial group width n >= 2 results in broken map
>  16145 - Simulated Caps lock key press via XTestFakeKeyEvent does not toggle the LED indicator
>  16364 - Behavior of xmodmap differs when invoked before any key has been pressed
> 
> or asked differently: Is there some background to these changes,
> e.g. bugreports. Which ones?

It fixes #16364, yes.  #13539 may well have already been fixed by other
means, as I haven't been able to reproduce it in a while.  The other two
will need to be fixed differently, later (#16105 in
xkb/xkbUtils.c:XkbCopyKeymap, #16145 already has a patch or at least a
description of how such a patch would be written).

The background to the patches is in paragraph 2: right now, when you ask
for XKB changes, it only gets applied on the virtual core
keyboard/master device, if that's what you ask for.  However, we treat
slave/physical devices as having the master copies of the keymap, so you
usually end up with something like this:
  * start
    + master: pristine keymap
    + slave: pristine keymap
  * client enables stickykeys, or whatever
    + master: stickykeys enabled
    + slave: pristine keymap
  * pivot the keymap by switching keyboards, meaning the slave's keymap
    gets copied to the master
    + master: pristine keymap
    + slave: pristine keymap

With these patches, both master and slave would have stickykeys enabled
at #2, meaning they'd both have them enabled at #3.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20080801/7dfc7afd/attachment.pgp>


More information about the xorg mailing list