lxpanel icon indicating copy to clipboard operation
lxpanel copied to clipboard

Use XkbRF_GetNamesProp instead of xkb_symbols. Fixes #51

Open mcz opened this issue 1 year ago • 3 comments

Trying to parse xkb_symbols to get the currently active layouts is buggy and unreliable. This uses XkbRF_GetNamesProp() from X11/extensions/XKBrules.h instead.

mcz avatar Apr 17 '23 14:04 mcz

Could you please provide a complete setxkbmap command that triggers the bug?

I tested your solution and it seems to have regressions too.

wandrien avatar May 10 '23 09:05 wandrien

This one seems working for me: https://github.com/lxde-continued/lxpanel/commit/135e3e5805938a7c64341bbfdc413f08c3ac5be5

wandrien avatar May 10 '23 10:05 wandrien

It's not a setxkbmap command per se, since the plugin resets the layout to its own settings (i.e. if I have us set in the Keyboard Layout Handler settings and run setxkbmap de, it immediately gets set back to us). The settings this happens with are

Plugin {
  type=xkb
  Config {
    Model=pc105
    LayoutsList=us,ru
    VariantsList=,phonetic_YAZHERTY
    ToggleOpt=grp:alts_toggle
    DisplayType=0
    KeepSysLayouts=0
    NoResetOpt=0
    FlagSize=4
    AdvancedOpt=-rules evdev
  }
}

Here's a screenshot: pic

mcz avatar May 11 '23 01:05 mcz