xpra icon
Bug tracker and wiki

Opened 11 months ago

Closed 11 months ago

Last modified 8 months ago

#1380 closed enhancement (fixed)

synchronize xkb layout group

Reported by: Antoine Martin Owned by: alas
Priority: major Milestone: 2.0
Component: server Version: trunk
Keywords: x11 keyboard xkb Cc:

Description

(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.

Motivation


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?

Attachments (2)

x11-sync-xkb-layout-group.patch (4.3 KB) - added by Antoine Martin 11 months ago.
original patch
xkb-layout-group.patch (5.2 KB) - added by Antoine Martin 11 months ago.
improved patch: use xsync instead of Flush, less intrusive in ServerBase? class

Download all attachments as: .zip

Change History (6)

Changed 11 months ago by Antoine Martin

original patch

Changed 11 months ago by Antoine Martin

Attachment: xkb-layout-group.patch added

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

comment:1 Changed 11 months ago by Antoine Martin

Owner: changed from Antoine Martin to alas

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.

comment:2 Changed 11 months ago by Antoine Martin

minor fixes in r14570

comment:3 Changed 11 months ago by J. Max Mena

Resolution: fixed
Status: newclosed

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.

comment:4 Changed 11 months ago by Antoine Martin

Minor fixes in r14588.

Last edited 8 months ago by Antoine Martin (previous) (diff)
Note: See TracTickets for help on using tickets.