lack of GetModifierMapping/SetModifierMapping symmetry

Pierre Ossman ossman at cendio.se
Wed Apr 29 01:05:14 PDT 2009


It seems Daniel is to blame here, in commit ad631afc to be exact. What
do you have to say for yourself? :)

(It also seems that this problem has gone away with MPX)

On Tue, 28 Apr 2009 16:07:37 +0200
Pierre Ossman <ossman at cendio.se> wrote:

> I'm having a bit of a problem with Xvnc here and I need to understand
> the core design a bit more.
> 
> The basic problem is that some client does GetModifierMapping followed
> by a SetModifierMapping. This has the effect of completely nuking the
> modifier mapping tables.
> 
> The reason this happens is how Xorg handles the mapping between the
> multiple keyboards internally and the single keyboard exposed via X11.
> A call to GetModifierMapping gives you the mappings for the currently
> active keyboard, but SetModifierMapping modifies the mappings for all
> keyboards (strictly speaking, all core keyboards).
> 
> Now since Xvnc shares most of its code with libvnc.so (the addon to a
> running Xorg server), it adds a second keyboard and does not try to
> make it the primary one. Since Xorg wants a primary keyboard, it
> creates a dummy one which is basically blank. So the client mentioned
> above will read the empty mappings from this dummy keyboard and write
> them to the VNC keyboard.
> 
> I'm not entirely sure how to fix this. I'd like to understand why
> GetModifierMapping/SetModifierMapping are implemented the way they are
> first though. Does anyone have any insight into that?
> 
> Peter, you've been neck deep in Xorg's input layer for some time now.
> Do you have any ideas?
> 
> Rgds


-- 
Pierre Ossman            OpenSource-based Thin Client Technology
System Developer         Telephone: +46-13-21 46 00
Cendio AB                Web: http://www.cendio.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20090429/93d7caa2/attachment.pgp 


More information about the xorg-devel mailing list