Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

synchronize xkb layout group #1380

Closed
totaam opened this issue Dec 13, 2016 · 10 comments
Closed

synchronize xkb layout group #1380

totaam opened this issue Dec 13, 2016 · 10 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Dec 13, 2016

Issue migrated from trac ticket # 1380

component: server | priority: major | resolution: fixed | keywords: x11 keyboard xkb

2016-12-13 16:59:35: antoine created the issue


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

@totaam
Copy link
Collaborator Author

totaam commented Dec 13, 2016

2016-12-13 16:59:55: antoine uploaded file x11-sync-xkb-layout-group.patch (4.3 KiB)

original patch

@totaam
Copy link
Collaborator Author

totaam commented Dec 13, 2016

2016-12-13 17:01:14: antoine uploaded file xkb-layout-group.patch (5.3 KiB)

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

@totaam
Copy link
Collaborator Author

totaam commented Dec 17, 2016

2016-12-17 15:55:14: antoine changed owner from antoine to afarr

@totaam
Copy link
Collaborator Author

totaam commented Dec 17, 2016

2016-12-17 15:55:14: antoine commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Dec 19, 2016

2016-12-19 17:23:06: antoine commented


minor fixes in r14570

@totaam
Copy link
Collaborator Author

totaam commented Dec 21, 2016

2016-12-21 18:07:30: maxmylyn changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Dec 21, 2016

2016-12-21 18:07:30: maxmylyn set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Dec 21, 2016

2016-12-21 18:07:30: maxmylyn commented


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.

@totaam totaam closed this as completed Dec 21, 2016
@totaam
Copy link
Collaborator Author

totaam commented Dec 23, 2016

2016-12-23 08:42:00: antoine commented


Minor fixes in r14588.

@totaam
Copy link
Collaborator Author

totaam commented Dec 4, 2017

2017-12-04 09:01:19: antoine commented


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant