Xpra: Ticket #1234: Keyboard layout sync and managers

With global layout mode (X default, when no layout tool is used) layout can get out of sync: when xpra window is in focus, layout switches both on client and on server. When xpra window is out of focus, layout is only switched on client. When xpra recieves focus again, layouts can be inverted between client and server.

When using per-app mode (i.e. gxkb provides that, other tools like qxkb, gnome-settings-daemon can be configured also), layout is remembered per application (supposedly by PID). This works fine (omitting that all xpra windows get the same layout, but that is expected) for some time, until at some point it gets out of sync and becomes inverted also. Perhaps, when xpra window gains or looses focus it may or may not catch layout change.

I haven't tested any per-window mode, but supposedly it should have similar problem to per-app mode.

So, the main problem is that layout on server can become different than layout on client. Switching several times while xpra window is in focus re-syncs layouts. Also, witching layouts by gxkb tray icon, even when xpra window is in focus, does not affect layout on server.

Sat, 18 Jun 2016 09:33:22 GMT - Antoine Martin: keywords, owner, component, milestone changed

We detect that the layout has changed using keys-changed signal of gtk.gdk.Keymap, maybe it isn't firing when it should. We could try to use the X11 hooks to make sure we get all such events.

Split from #1027 which is for win32.

Can you post the -d keyboard output of such events?

Sat, 18 Jun 2016 09:39:57 GMT - psycho_zs: attachment set

Sat, 18 Jun 2016 09:43:39 GMT - psycho_zs:

Attached the client terminal output. Attached to server, started leafpad, typed something in 'us' layout, switched to 'ru', typed again, changed to other window (local with 'en' layout), changed back to xpra leafpad window which should have 'ru' layout, typed, got latin characters. Gxkb icon showed ru layout for this window.

Tue, 12 Jul 2016 16:51:50 GMT - Antoine Martin: milestone changed

Milestone renamed

Sun, 21 Aug 2016 09:55:49 GMT - Antoine Martin: milestone changed

Milestone renamed

Fri, 16 Dec 2016 19:46:35 GMT - Antoine Martin:

Maybe #1380 will help?

Fri, 23 Dec 2016 19:13:04 GMT - psycho_zs: status changed; resolution set

Tested in 2.0-20161223r14589-1. Layout seem to stay in sync with what is currently selected locally on the client. Fixed, thanks!

Mon, 23 Jan 2017 07:36:08 GMT - Antoine Martin: summary changed

(typo in title)

Sat, 23 Jan 2021 05:18:38 GMT - migration script:

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