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

Use XkbRF_GetNamesProp instead of xkb_symbols. Fixes #51 #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mcz
Copy link

@mcz mcz commented Apr 17, 2023

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.

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.
@wandrien
Copy link

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

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

@wandrien
Copy link

wandrien commented May 10, 2023

This one seems working for me: lxde-continued@135e3e5

@mcz
Copy link
Author

mcz commented May 11, 2023

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

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

Successfully merging this pull request may close these issues.

None yet

2 participants