Xpra: Ticket #1380: synchronize xkb layout group

(received by email:) I attach small patch that make it possible to xpra server synchronize XKB layout group with a client.

Maybe you would like to integrate it somehow/someday.


Environment: arch linux x64, recent. both client and server are on thesame machine (with intention to simply isolate untrusted gui app). Xorg/gdm/mutter (I am unsure about WM though). It is sufficient that client is under such conditions, server location does not matter.

Under this environment changing layouts is done not by loading another keymap (original keymap pushed from client to server is already including two required layouts) but just by changing keys group.

Because of that server does not know about layout 'change', and continues to use wrong mappings.

Well, actually server does know a key group, just does not care of it.

This patch adds very simple check of incoming key's group and locks on it when it sees a change. That is it.

For me it works, for other environments need to be tested. Sorry for the poor code, I was using python for very first time. Also it is possible these mods were placed into wrong places, but I made the best I can

BTW, any plans to switching to python 3.x?

Tue, 13 Dec 2016 16:59:54 GMT - Antoine Martin: attachment set

original patch

Tue, 13 Dec 2016 17:01:13 GMT - Antoine Martin: attachment set

improved patch: use xsync instead of Flush, less intrusive in ServerBase? class

Sat, 17 Dec 2016 15:55:14 GMT - Antoine Martin: owner changed

Patch applied in r14561.

I thought I was seeing complete server crashes with this patch just when the client connects - but that seems to have gone away completely. Might have been a fluke.

@afarr: this is just a FYI, it is only used with Linux clients at present and should give us better native multi-layout keyboard mapping support. I don't use such layouts so I don't really know how to test this feature.

As for the Python3 question, see #640. TLDR: py3k is a real pain to support (just search for "python3" on the bug tracker) and GTK3 ever more so.

Mon, 19 Dec 2016 17:23:06 GMT - Antoine Martin:

minor fixes in r14570

Wed, 21 Dec 2016 18:07:29 GMT - J. Max Mena: status changed; resolution set

Playing around with a 1.0 r14570 Client - updating my keyboard layout notifies the server of the change. Noting the FYI, and closing.

I, too, do not have an international keyboard so I can't verify things are where they should be, but the server is getting updates about me changing my layout.

Also, as an aside, the ctrl + alt + k shortcut for KDE does not actually change the layout. I get a notification saying it got the keys and then it just tells me that "yep, still using US". Lame.

Fri, 23 Dec 2016 08:42:00 GMT - Antoine Martin:

Minor fixes in r14588.

Mon, 04 Dec 2017 09:01:19 GMT - Antoine Martin:

This change caused problems with win32 clients (and maybe others), see ticket:1665#comment:3

Sat, 23 Jan 2021 05:22:39 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1380